title: Spring MVC jackson message converter date format is not working, always return long timestamp
body: <p>I have found this two:</p>
  
  <p><a href="https://stackoverflow.com/questions/20474374/jackson-object-mapper-in-spring-mvc-not-working">Jackson Object Mapper in spring MVC not working</a></p>
  
  <p><a href="https://stackoverflow.com/questions/32032284/why-is-the-object-mapper-date-fromat-not-used-by-message-converters-for-date-tra">why is the Object Mapper date fromat not used by message converters for date transform?</a></p>
  
  <p>but none are the solution for me.</p>
  
  <p>Spring MVC xml:</p>
  
  <pre><code>&lt;mvc:annotation-driven&gt;
      &lt;mvc:message-converters register-defaults="false"&gt;
          &lt;bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"&gt;
            &lt;property name="objectMapper"&gt;
               &lt;bean class="com.xxx.model.MyJacksonObjectMapper"&gt;
  
               &lt;/bean&gt;
            &lt;/property&gt;
          &lt;/bean&gt;
      &lt;/mvc:message-converters&gt;
  &lt;/mvc:annotation-driven&gt;
  </code></pre>
  
  <p>MyJacksonObjectMapper:</p>
  
  <pre><code>public class MyJacksonObjectMapper extends ObjectMapper {
  
      private static final long serialVersionUID = -3282890427623599460L;
  
      public MyJacksonObjectMapper() {
          super();
          disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
          setDateFormat(new SimpleDateFormat("yyyy-MM-dd"));          
      }
  
  }
  </code></pre>
  
  <p>Not matter I change <code>register-defaults</code> to true or false, it is still not working, my controller always serialize the object's date value in timestamp (long) format.</p>
  
  <p>My POJO object is not appended with any annotation, it is plain POJO and I cannot annotate it with any annotation (not my class), I believe there must be config to allow serialize default object's date in desired format, but it is not working, please help.</p>
  
  <p>Dependency:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
      &lt;version&gt;2.7.3&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
      &lt;version&gt;2.7.3&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
      &lt;version&gt;4.2.5.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>