UserController.java 724 B

12345678910111213141516171819202122232425262728293031323334
  1. package com.yaozhitech.spring5.controller;
  2. import org.springframework.web.bind.annotation.PathVariable;
  3. import org.springframework.web.bind.annotation.RequestMapping;
  4. import org.springframework.web.bind.annotation.RestController;
  5. import com.yaozhitech.spring5.model.UserDomain;
  6. import com.yaozhitech.spring5.service.UserService;
  7. import lombok.AllArgsConstructor;
  8. /**
  9. * <p>
  10. * 系统用户 前端控制器
  11. * </p>
  12. *
  13. * @author zeda
  14. * @since 2019-12-15
  15. */
  16. @RestController
  17. @RequestMapping("/user")
  18. @AllArgsConstructor
  19. public class UserController {
  20. private final UserService userService;
  21. @RequestMapping(value="/{id}")
  22. public UserDomain getById(@PathVariable Integer id) {
  23. return userService.getById(id);
  24. }
  25. }