403 forbidden when I try to post to my spring api?
问题 Using postman, I can get a list of users with a get request to: http://localhost:8080/users . But when I send a post request to the same address, I get a 403 error. @RestController public class UserResource { @Autowired private UserRepository userRepository; @GetMapping("/users") public List<User> retrievaAllUsers() { return userRepository.findAll(); } @PostMapping("/users") public ResponseEntity<Object> createUser(@RequestBody User user) { User savedUser = userRepository.save(user); URI