title: Jackson SerializationFeature.WRITE_DATES_AS_TIMESTAMPS not turning off timestamps in spring
body: <p>After a lot of searching I tracked down how to stop java.util.Date fields from being serialised into timestamps when converting to JSON responses in my @RestController.</p>
  
  <p>However I cannot get it to work. All the posts I found said to disable the SerializationFeature.WRITE_DATES_AS_TIMESTAMPS feature of the Jackson objet mapper. So I wrote the following code:</p>
  
  <pre><code>public class MVCConfig {
  
      @Autowired
      Jackson2ObjectMapperFactoryBean objectMapper;
  
      @PostConstruct
      public void postConstruct() {
          this.objectMapper.setFeaturesToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
      }
  }
  </code></pre>
  
  <p>As I understand it, a config is a bean as well so auto wiring in the object mapper to set additional properties should work. I've used break points and everything looks good with this setup.</p>
  
  <p>However when I serialise a bean with a java.util.Date property in a response to a http query, I'm still getting a time stamp. </p>
  
  <p>Does anyone know why this is not working? It's got me stumped !</p>