春季启动“无可用消息”(类型=找不到,状态= 404)

时间:2018-09-06 06:59:50

标签: java spring spring-boot http-status-code-404

我没有要求按摩的问题

http://localhost:8080/save-user?username=spring&firstname=sp&lastname=try&age=21&password=123123/

@GetMapping("/save-user")
public String saveUser(@RequestParam String username, @RequestParam String firstname, @RequestParam String lastname, @RequestParam int age, @RequestParam String password) {
    User user = new User(username,firstname,lastname,age,password);
    userService.saveMyUser(user);
    return "User Saved";
}

0 个答案:

没有答案