title: Spring controller not accepting application/json
body: <p>When I am passing application/json parameters from Chrome Rest Client,I am getting 400 bad request error.
  When I add required=false for @RequestParam, the request is accepted by Controller but the values is Null.</p>
  
  <pre><code>@RequestMapping(value = "/add",
                  method = RequestMethod.POST,
                  consumes="application/json",
                  produces="application/json")
  public @ResponseBody String add(
    @RequestParam(value="surveyName") String surveyName,
    @RequestParam(value="surveyDesc")  String surveyDesc,
    ModelMap model) throws Exception
  {
      System.out.println("request parameters in /add/syrvey surveyName= "+surveyName);
  }
  </code></pre>
  
  <p>My JSON request is as below and Content-Type is "aplication/json"</p>
  
  <pre><code>{"surveyName"="sd", "surveyDesc":"sd"}
  </code></pre>
  
  <p>I tried using headers="Accept=application/json",but it didn't help much.</p>
  
  <p>My dispatcher-servlet is</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="&gt;
      &lt;context:annotation-config /&gt;
      &lt;context:component-scan base-package="com.survey.controller" /&gt;
      &lt;context:component-scan base-package="com.survey.service" /&gt;
      &lt;context:component-scan base-package="com.survey.dao" /&gt;
      &lt;context:component-scan base-package="com.survey.entity" /&gt;
      &lt;context:component-scan base-package="com.survey.constants" /&gt;
      &lt;mvc:annotation-driven /&gt;
      &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="prefix" value="/WEB-INF/jsp/" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
      &lt;bean id="jacksonMessageConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" /&gt;
      &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"&gt;
          &lt;property name="messageConverters"&gt;
              &lt;list&gt;
                  &lt;ref bean="jacksonMessageConverter" /&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>My pom.xml is</p>
  
  <pre><code>&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.9.12&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Any help greatly appreciated  </p>