当前位置:网站首页>[bug] @jsonformat has a problem that the date is less than one day when it is used

[bug] @jsonformat has a problem that the date is less than one day when it is used

2022-06-24 09:14:00 Duxiaolie

Problem description :

Date data obtained from the front page , There is a problem of reducing one date .


Controller layer Data during commissioning :
 Insert picture description here

postman Received data :  Insert picture description here


Cause analysis :

There was a problem returning .
The type of database storage is :date
 Insert picture description here


Solution :

Use @JsonFormat Time zone needs to be specified [email protected](timezone = “GMT+8”, pattern = “yyyy-MM-dd”)
 Insert picture description here

原网站

版权声明
本文为[Duxiaolie]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240758213555.html