title: Spring and MappingJackson2HttpMessageConverter and registerModule
body: <p>We are using the latest Spring 4.2.x and we recently went from Jackson Mapper 2.6.3 to 2.8.8, and now we are registering Modules.</p>
  
  <p>Here is part of what or spring-servlet.xml looks like:</p>
  
  <pre><code>&lt;mvc:annotation-driven&gt;
      &lt;mvc:message-converters register-defaults="true"&gt;
          &lt;bean
              class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"&gt;
              &lt;property name="objectMapper"&gt;
                  &lt;bean class="com.fasterxml.jackson.databind.ObjectMapper"&gt;
                      &lt;property name="dateFormat"&gt;
                          &lt;bean class="java.text.SimpleDateFormat"&gt;
                              &lt;constructor-arg type="java.lang.String" value="yyyy-MM-dd"&gt;&lt;/constructor-arg&gt;
                          &lt;/bean&gt;
                      &lt;/property&gt;
                  &lt;/bean&gt;
              &lt;/property&gt;
          &lt;/bean&gt;
      &lt;/mvc:message-converters&gt;
  &lt;/mvc:annotation-driven&gt;
  </code></pre>
  
  <p>and here is what we us in code to map a json file:</p>
  
  <pre><code>    ObjectMapper mapper = new ObjectMapper();
      mapper.registerModule(new ParameterNamesModule());
      mapper.registerModule(new Jdk8Module());
      mapper.registerModule(new JavaTimeModule());
  </code></pre>
  
  <p>So, what I'd like to do is configure the "spring-servlet" and "MappingJackson2HttpMessageConverter" so that I can add the modules to register.</p>
  
  <p>Yes, we haven't gotten into using @Configuration yet, we are still using the XML  which I don't mind at all.</p>
  
  <p>Thanks for any help!</p>