title: Use @RequestBody with optional body in latest Spring v4
body: <p>How do I make body optional in REST API calls when using <code>@RequestBody</code> annotation in Spring?</p>
  
  <p>With Spring's latest version, if you use <code>@RequestBody</code> annotation, it makes client to send body all the time without making it optional. </p>
  
  <p>I tried <code>@RequestBody (required=false)</code> but that didn't work &amp; still my request comes as null.</p>
  
  <p>How do I manage to get request converted to proper required object without making body mandatory?</p>
  
  <p>For eg:</p>
  
  <pre><code>@RequestMapping(value="/add/employee", method=RequestMethod.POST)
  public void addEmployee(@RequestBody Employee employee){
      // ...
  }
  </code></pre>
  
  <p>Here, I want to add employee using POST but without body. How do I do that? Spring latest version throws error "body missing" if I send empty body...</p>