I am using spring-boot 1.2.1.RELEASE with jackson 2.6.2 including the jsr310 datatype. I am using the annotation @SpringBootApplication to kick off my Spring app. I have
spring.jackson.serialization.write_dates_as_timestamps = false
set in my application.properties (which I know is being read because I tested with banner = false).
And yet java.time.LocalDate is still being serialized as an array of integers. I am not using @EnableWebMvc.
It looks like if I add the tag
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
to my LocalDate variable then it works. But I thought it was automatic with the above property set. Plus, if I remember right (I've since just decided to work with the integer array), that only worked with serialization and not deserialization (but I can't honestly quite remember if that last part is true).
objectMapper.registerModule(new JavaTimeModule());
– Madigan