Can we use @RequestParam along with @RequestBody in Spring Controller
<pre><code>public ResponseEntity&lt;String&gt; action(@RequestParam(value = "id") final String id,@RequestBody item item)
throws IllegalAccessException {
    System.out.println("");
}
</code></pre>

<p>I get Bad request error whenever I hit this URL.</p>

<p>Request JSON:</p>

<pre><code>{
    "id": "rw121232323e",
    "item":{
            "code": "shirt",
            "qty":10
           }
}
</code></pre>

<p>But the code works when I have only <code>@RequestBody</code> in my controller method.
Wanted to know if <code>@RequestParam</code> and <code>@RequestBody</code> can be used together.</p>