I have created a simple application with spring boot 1.5.2. I am passing date and already mentioned the date format in application.properties file as follwoing : spring.jackson.joda-date-time-format=yyyy-MM-dd
But while calling the rest rest service using any client for POST(Insert) or PUT(Update), date is changing to on day old. Example 2017-03-21 will change to 2017-03-20.
I had the same issue and I solved it in that way: In your entitiy, add theses annotations:
@Temporal(TemporalType.DATE)
@JsonFormat(shape = JsonFormat.Shape.STRING, locale = "fr-FR", timezone = "Europe/Paris")
private Date yourDate;
Or you can add theses line to application.properties file:
spring.jackson.time-zone=Europe/Paris
spring.jackson.locale=fr_FR
If you are in another country you can change locale and timezone, but even if you keep France, it will work.