title: Jackson serializationConfig
body: <p>I am using Jackson JSON in a Spring 3 MVC app. To not serialize each and every single Date field, I created a custom objectmapper that uses a specific DateFormat:</p>
  
  <pre><code>@Component("jacksonObjectMapper")
  public class CustomObjectMapper extends ObjectMapper
  {
      Logger log = Logger.getLogger(CustomObjectMapper.class);
  
      @PostConstruct
      public void afterProps()
      {
          log.info("PostConstruct... RUNNING");
          //ISO 8601
          getSerializationConfig().setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SZ"));
  
  
      }
  
      //constructors...
  
  }
  </code></pre>
  
  <p>This custom ObjectMapper is injected into the JsonConverter:</p>
  
  <pre><code>&lt;bean id="jsonConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"&gt;
      &lt;property name="supportedMediaTypes" value="application/json" /&gt;
      &lt;property name="objectMapper" ref="jacksonObjectMapper" /&gt; &lt;!-- defined in CustomObjectMapper --&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>There is no exception in the logs and serialization works, but it is not picking up the dateformat, it simple serializes to a timestamp. The @PostConstruct annotation works, the log statement in the method is in the logs. </p>
  
  <p>Does anyone know why this fails?</p>