Spring @RequestBody Bad Request
<p>I am using POSTMAN to send request's.</p>

<p>Configured all right there:</p>

<ul>
<li>Content-Type application/json</li>
<li>Request Type POST
and in Body I have the following:</li>
</ul>

<pre class="lang-none prettyprint-override"><code>{
    "token":"EAACEdEose0cBAFLc4blCYmmetEMBEZCiQQZAuvz6DlxFt0yPZCksZBWv09B71aZCeDH9zOPyzM44GRl8WA56uFZBmOiUMmSlk3USfOwRdwmXDnhlPArttzjjLzUXaTReHzHZC7ZCcFzZADwGBLRUHvTb17nagRDLpZBysdxZBxuJuojlgZDZD"
}
</code></pre>

<p>I POST this to a controller and get a 400 BAD Request Error:</p>

<pre><code>{
"timestamp": 1475061564742,
"status": 400,
"error": "Bad Request",
"exception": "org.springframework.http.converter.HttpMessageNotReadableException",
"message": "Could not read document: Can not construct instance of at.wastun.controller.WTUserController$RegisterBody: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)\n at [Source: java.io.PushbackInputStream@a646ac6; line: 2, column: 2]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of at.wastun.controller.WTUserController$RegisterBody: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)\n at [Source: java.io.PushbackInputStream@a646ac6; line: 2, column: 2]",
"path": "/users/register"
}
</code></pre>

<p>The class and the Controller looks like:</p>

<pre><code>@Controller
@RequestMapping("/users")
@ResponseBody
public class WTUserController {

    private class RegisterBody{
        private String token;

        public String getToken() {
            return token;
        }

        public void setToken(String token) {
            this.token = token;
        }

        public RegisterBody(String fbToken){
            this.token = fbToken;
        }
    }

    @RequestMapping(value="/register", method = RequestMethod.POST)
    public String method0(@RequestBody RegisterBody body){
        return body.getToken();
    }

}
</code></pre>