You can't have multiple @RequestBody annotations for the same method. The reason for that is that any HTTP request contains a single body.
@RequestBody
body
The solution would be to modify your request body so that it supports both models.
More details here Passing multiple variables in @RequestBody to a Spring MVC controller using Ajax
2.1m questions
2.1m answers
60 comments
57.0k users