title: How to Use Spring Boot's 'spring.jackson.date-format' Property?
body: <p>According to the <a href="http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html" rel="noreferrer">Current SpringBoot Reference Guide</a> if I set the <code>spring.jackson.date-format</code> property, it will: <code>Date format string or a fully-qualified date format class name. For instance 'yyyy-MM-dd HH:mm:ss'</code>. </p>
  
  <p>However, it doesn't work this way with Spring Boot 1.5.3.</p>
  
  <p>To demonstrate, starting with this class:</p>
  
  <pre><code>import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.web.bind.annotation.GetMapping;
  import org.springframework.web.bind.annotation.RestController;
  
  import java.time.Instant;
  
  @SpringBootApplication
  public class DemoApplication {
    public static void main(String[] args) {
      SpringApplication.run(DemoApplication.class, args);
    }
  }
  
  @RestController
  class NowController{
  
    @GetMapping("/now")
    Instant getNow(){
      return Instant.now();
    }
  
  }
  </code></pre>
  
  <p>and this <code>src/main/resources/application.properties</code> </p>
  
  <pre><code>spring.jackson.date-format=dd.MM.yyyy
  </code></pre>
  
  <p>and this <code>build.gradle</code>:</p>
  
  <pre><code>buildscript {
      ext {
          springBootVersion = '1.5.3.RELEASE'
      }
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
      }
  }
  
  apply plugin: 'org.springframework.boot'
  
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = 1.8
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile('org.springframework.boot:spring-boot-starter-web')
      compile('com.fasterxml.jackson.datatype:jackson-datatype-jdk8')
      compile('com.fasterxml.jackson.datatype:jackson-datatype-jsr310')
      testCompile('org.springframework.boot:spring-boot-starter-test')
  }
  </code></pre>
  
  <p>I get the following:</p>
  
  <pre><code>http localhost:8080/now
  HTTP/1.1 200 
  Content-Type: application/json;charset=UTF-8
  Date: Tue, 25 Apr 2017 22:37:58 GMT
  Transfer-Encoding: chunked
  
  "2017-04-25T22:37:58.319Z"
  </code></pre>
  
  <p>Notice that this is not the specified format <code>dd.MM.yyyy</code>. Is there something else required is <code>spring.jackson.date-format</code> not working as documented?</p>