title: Using Java Written @RequestBody grails
body: <p>I'm using Grails 2.3.5.
  In my project I have created RestWebservice using Spring @Controller annotation.
  When I'm trying to sent JSON request to it its showing
  org.springframework.web.HttpMediaTypeNotSupportedException] to request in view with name 'error'.</p>
  
  <p>So I thought that its not able to cast JSON to Object So I have added</p>
  
  <pre><code>compile "org.codehaus.jackson:jackson-core-asl:1.9.8"
          compile "org.codehaus.jackson:jackson-mapper-asl:1.9.8"
  </code></pre>
  
  <p>in my BuildConfig.grovvy
  Even after that issue exist.</p>
  
  <pre><code>@Controller
  public class VendorController {
  @RequestMapping(value ="/api/anonymous/book.dispatch", produces=MediaType.APPLICATION_JSON)
  @ResponseBody
  public vender validateVendor(@RequestBody Vender vender)
  {
  try {
  //Logic***
  } catch (Exception e) {
  // TODO Auto-generated catch block
  return vender;
  }
  return vender;
  }
  </code></pre>
  
  <p>My dto is having default and parametarized constructor and its serialized
  Thanks</p>