title: Java LocalDateTime being converted into an array of ints when being converted to JSON using Spring boot rest
body: <p>My code is as below </p>
  
  <pre><code>@Data 
  @Document(collection = "models")
  public class Model {
    @Field(value = "modelDt")
    private LocalDateTime modelDate;
  }
  
  @Data
  public class ModelDTO {
    private LocalDateTime modelDate;
  }
  
  @RestController
  @RequestMapping("/api/v1/model")
  public class ModelController {
  
    @Autowired 
    ModelService modelService;
  
    @GetMapping
    public List&lt;ModelDTO&gt; getModels() {
      return modelService.getAllModels();
    }
  }
  
  </code></pre>
  
  <p>Used this almost everywhere where the JSON response is coming as a proper format like yyyy-mm-ddT00:00:00 , but in the above case I'm getting the date in the below format. </p>
  
  <pre><code>[
    {
      "modelDate": [
      YYYY,
      MM, 
      DD, 
      00,
      00,
      0000
      ]
    }
  ]
  </code></pre>
  
  <p>I've crossed checked my code with the ones where the proper format is being returned. </p>