title: Json string from LocalDateTime(java 8) in Spring MVC
body: <p>have trouble in LocalDateTime(Java 8) Formatting in Spring MVC framework</p>
  
  <p>my <strong>VO</strong> is like under code</p>
  
  <p>in mySQL w_date field is <strong>DATETIME</strong> and recode like <code>"2015-12-25 23:18:22"</code></p>
  
  <pre><code>public class HistoryBoard { 
      @JsonFormat(pattern="yyyy-MM-dd")
      @DateTimeFormat(iso = DateTimeFormat.ISO.TIME)
      private LocalDateTime w_date;
  
  
      public LocalDateTime getW_date() {
          return w_date;
      }
  
      public HistoryBoard setW_date(String w_date) {
          DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S");
          this.w_date = LocalDateTime.parse(w_date, sdf);
          return this;
      }
  }
  </code></pre>
  
  <p>add maven dependency</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.5.3&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>and add <code>@JsonFormat(pattern="yyyy-MM-dd")</code> in field value <strong>w_date</strong></p>
  
  <p>but still json get Object like</p>
  
  <pre><code>"w_date":{"dayOfMonth":25,"dayOfWeek":"FRIDAY","month":"DECEMBER","year":2015,"dayOfYear":359,"monthValue":12,"hour":23,"minute":18,"second":22,"nano":0,"chronology":{"id":"ISO","calendarType":"iso8601"}
  </code></pre>
  
  <p>json page Controller code</p>
  
  <pre><code>@RequestMapping(value = "/listJson.do")
  public @ResponseBody Object listJson(Map&lt;String, Object&gt; commandMap, ModelMap model) throws Exception {
      List&lt;HistoryBoard&gt; list = boardService.selectBoardList(commandMap);
      return list;
  
  }
  </code></pre>