Jan 4th, 2012, 05:30 PM
annotation @RequestBody is disallowed for this location
I added a method to my Scaffolded controller that I need to have @RequestBody, but I am getting an error:
The annotation @RequestBody is disallowed for this location
I tried putting it in front of the method and in front of the return type, both complain. Can you not add this annotation in a scaffolded controller? I have it in other places and it works fine.
Jan 18th, 2012, 11:52 AM
I am stupid. The proper annotation is @ResponseBody, not @RequestBody.
Last edited by mbabauer; Jan 18th, 2012 at 11:58 AM.