title: How to accept LocalDateTime param in a GET request to Spring Boot Controller?
body: <p>This question is very similar to <a href="https://stackoverflow.com/q/15164864/3913366">this SO problem</a> which is for older <code>Date</code> API.</p>
  
  <p>I want to achieve the same with Java 8 <code>LocalDateTime</code> API. When I do,</p>
  
  <pre><code>@RequestMapping("/locationSnapshot/{userId}/{pointInTime}")
  public MyResponse getLocationInTime(
          @PathParam(value="userId") Long userId,
          @PathParam(value="pointInTime")
          @DateTimeFormat(pattern="yyyy-MM-dd'T'HH:mm:ss") LocalDateTime pointInTime) {
  
      MyResponse response = new MyResponse();
      return response;
  }
  </code></pre>
  
  <p>I get,</p>
  
  <pre><code>Failed to instantiate [java.time.LocalDateTime]: No default constructor
  found; nested exception is java.lang.NoSuchMethodException: 
  java.time.LocalDateTime.&lt;init&gt;()
  </code></pre>