@JsonFormat date less one day

Original blog: https://www.cnblogs.com/winner-0715/p/6264172.html

Solution:

@JsonFormat(pattern="yyyy-MM-dd")
private Date birth;

Change

@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birth;

Plus the time zone to China is the East eight districts

Guess you like

Origin blog.csdn.net/luo_yu_1106/article/details/90692793