提交 87431349 authored 作者: shaotianyang's avatar shaotianyang

commit

上级 9b320a75
......@@ -12,13 +12,24 @@ public class UserController {
@Autowired
private UserService userService;
// http://localhost:8081/user/findAllUser
@GetMapping("/findAllUser")
/**
* 查询所有用户信息
* @return
* http://localhost:8081/user
*/
//
@GetMapping
public String findAllUser() {
return userService.findAllUser().toString();
}
@GetMapping("/findUserById/{id}")
/**
* 查询指定id的用户
* @param id
* @return
*/
// http://localhost:8081/user/1
@GetMapping("/{id}")
public String findUserById(@PathVariable Long id){
return userService.findUserById(id).toString();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论