title: Content type 'application/json' not supported in Spring MVC and jackson
body: <p>I'm getting an error (Handler execution resulted in exception: Content type 'application/json' not supported) when trying to receive a post request using Spring MVC.</p>
  
  <p>My Json, just for testing, is pretty simple:</p>
  
  <pre><code>{ "test": "abc123" }
  </code></pre>
  
  <p>My pojo class:</p>
  
  <pre><code>public class Request {
  
      String test;
  
      public String getTest() {
          return test;
      }
  
      public void setTest(String test) {
          this.test = test;
      }
  
  }
  </code></pre>
  
  <p>And my controller:</p>
  
  <pre><code>@RequestMapping(value = "/testing", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
  private void testing(@RequestBody Request body, @RequestHeader HttpHeaders headers, HttpServletRequest httpRequest) {
      System.out.println(body.getTest());
  }
  </code></pre>
  
  <p>In my pom.xml, I added: </p>
  
  <pre><code>&lt;dependencies&gt;
      ...
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
          &lt;version&gt;2.7.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
          &lt;version&gt;1.8.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.dataformat&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-dataformat-xml&lt;/artifactId&gt;
          &lt;version&gt;2.4.3&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>I think that something is wrong in json deserialization, but I cannot find it.</p>
  
  <p>Any help is welcome. Thanks.</p>