Results 1 to 2 of 2

Thread: annotation @RequestBody is disallowed for this location

  1. #1
    Join Date
    Feb 2006
    Posts
    115

    Default 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.

  2. #2
    Join Date
    Feb 2006
    Posts
    115

    Default

    I am stupid. The proper annotation is @ResponseBody, not @RequestBody.
    Last edited by mbabauer; Jan 18th, 2012 at 11:58 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •