| package com.pt5.pthouduan.controller; |
| |
| import com.pt5.pthouduan.entity.User; |
| import com.pt5.pthouduan.service.UserService; |
| import org.springframework.beans.factory.annotation.Autowired; |
| import org.springframework.web.bind.annotation.*; |
| import org.springframework.stereotype.Controller; |
| |
| /** |
| * <p> |
| * 前端控制器 |
| * </p> |
| * |
| * @author ljx |
| * @since 2025-04-14 |
| */ |
| @Controller |
| @RequestMapping("/user") |
| public class UserController { |
| @Autowired |
| private UserService userService; |
| |
| // 创建用户 |
| @PostMapping("/create") |
| @ResponseBody |
| public User createUser(@RequestBody User user) { |
| return userService.createUser(user); |
| } |
| |
| |
| |
| } |