title: Setting Jackson feature WRITE_DATES_AS_TIMESTAMPS not working in Spring Boot
body: <p>I set <code>spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false</code> in the Spring Boot config but the Jackson serializer still produces <code>[1942,4,2]</code> instead of <code>"1942-04-02"</code> for a <code>DateTime</code> value.</p>
  
  <p><strong>Some debugging snapshots</strong></p>
  
  <ul>
  <li><p>In <code>org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration.Jackson2ObjectMapperBuilderCustomizerConfiguration.StandardJackson2ObjectMapperBuilderCustomizer#customize</code> there's </p>
  
  <p><code>configureFeatures(builder, this.jacksonProperties.getSerialization());</code> </p>
  
  <p>which shows that "WRITE_DATES_AS_TIMESTAMPS" -> "false"</p></li>
  <li><p>Then a bit later in <code>org.springframework.http.converter.json.Jackson2ObjectMapperBuilder#configure</code> there's this loop</p>
  
  <p><code>for (Object feature : this.features.keySet()) {
    configureFeature(objectMapper, feature, this.features.get(feature));
  }</code></p>
  
  <p>and again <code>this.features</code> says "WRITE_DATES_AS_TIMESTAMPS" -> "false"</p></li>
  <li><p>Yet during serialzation of a <code>DateTime</code> <code>com.fasterxml.jackson.datatype.jsr310.ser.JSR310FormattedSerializerBase#useTimestamp</code> says false because <code>provider.isEnabled(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)</code> returns false.</p></li>
  </ul>
  
  <p><strong>Attempts at fixing</strong></p>
  
  <ul>
  <li>Out of despair I replaced <code>spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false</code> with <code>spring.jackson.serialization.write-dates-as-timestamps=false</code> because I found that mentioned in a lot of places (even though the <a href="http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-customize-the-jackson-objectmapper" rel="noreferrer">Boot documentation</a> doesn't hint at this). What about this? They seem to be synonyms - no effect.</li>
  <li>While writing this question SO suggested <a href="https://stackoverflow.com/q/38152180/131929">WRITE_DATES_AS_TIMESTAMPS not woking on Spring boot 1.3.5</a>. The answer says to replace <code>WebMvcConfigurationSupport</code> with <code>WebMvcConfigurerAdapter</code>. While this does help indeed I fail to understand why so.</li>
  </ul>