current position:Home>[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:20Duxiaolie

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

copyright notice
author[Duxiaolie],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/175/202206240758213555.html

Random recommended