title: How to use MappingJackson2HttpMessageConverter to convert Maps and List correctly?
body: <p>In my Spring MVC project MappingJackson2HttpMessageConverter configured as follows:</p>
  
  <pre><code>    &lt;bean id="jsonMessageConverter" class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"&gt;&lt;/bean&gt;
  
      &lt;bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"&gt;
      &lt;property name="messageConverters"&gt;
          &lt;list&gt;
              &lt;ref bean="jsonMessageConverter" /&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>For plain simple Java POJO Beans, serialization works well. All good. But, i also have Beans that include <code>Map</code>s that needed to be serialized as well, and it's fails (JsonMappingException).</p>
  
  <p>From <a href="https://github.com/FasterXML/jackson-databind/" rel="nofollow">Jackson instructions</a>, I know that to solve this what needed is to indicate the actual type for the object mapper. It looks like that: </p>
  
  <pre><code>Map&lt;String, ResultValue&gt; results = mapper.readValue(jsonSource,
                          new TypeReference&lt;Map&lt;String, ResultValue&gt;&gt;() { } );
  </code></pre>
  
  <p>How can be the same configuration be done to MappingJackson2HttpMessageConverter (with based on Jackson2 object mapper)? </p>