title: How to use LocalDateTime RequestParam in Spring? I get "Failed to convert String to LocalDateTime"
body: <p>I use Spring Boot and included <code>jackson-datatype-jsr310</code> with Maven:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-datatype-jsr310&lt;/artifactId&gt;
      &lt;version&gt;2.7.3&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>When I try to use a RequestParam with a Java 8 Date/Time type, </p>
  
  <pre><code>@GetMapping("/test")
  public Page&lt;User&gt; get(
      @RequestParam(value = "start", required = false)
      @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start) {
  //...
  }
  </code></pre>
  
  <p>and test it with this URL:</p>
  
  <pre><code>/test?start=2016-10-8T00:00
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>{
    "timestamp": 1477528408379,
    "status": 400,
    "error": "Bad Request",
    "exception": "org.springframework.web.method.annotation.MethodArgumentTypeMismatchException",
    "message": "Failed to convert value of type [java.lang.String] to required type [java.time.LocalDateTime]; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@org.springframework.web.bind.annotation.RequestParam @org.springframework.format.annotation.DateTimeFormat java.time.LocalDateTime] for value '2016-10-8T00:00'; nested exception is java.lang.IllegalArgumentException: Parse attempt failed for value [2016-10-8T00:00]",
    "path": "/test"
  }
  </code></pre>