1
0

UserController.java 783 B

1234567891011121314151617181920212223
  1. package com.seecoder.BlueWhale.Controller;
  2. import com.seecoder.BlueWhale.Service.UserService;
  3. import com.seecoder.BlueWhale.VO.ResultVO;
  4. import com.seecoder.BlueWhale.VO.UserVO;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.PostMapping;
  7. import org.springframework.web.bind.annotation.RequestBody;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.web.bind.annotation.RestController;
  10. @RestController
  11. @RequestMapping("/api/user")
  12. public class UserController {
  13. @Autowired
  14. UserService userService;
  15. @PostMapping("/register")
  16. public ResultVO<Boolean> register(@RequestBody UserVO userVO){
  17. return ResultVO.buildSuccess(userService.register(userVO));
  18. }
  19. }