控制器那里是怎么写的啊
他没说,无人知晓
@RestController public class UserController { private final UserRepository userRepository; @Autowired public UserController(UserRepository userRepository) { this.userRepository = userRepository; } @PostMapping("/person/user") public User save(@RequestParam String name){ User user = new User(); user.setName(name); if(userRepository.save(user)){ System.out.printf("用户对象: %s 保存成功", user); } return user; } }