Convert JSON time to East Eighth District in SpringBoot

  1. In springBoot, the time in json format is converted to the time in the eighth district of the East.

It turned out to be defined in the .yml file:

To perform time conversion in json format, it is found that the time conversion is incorrect

Solution: In the entity class, @JsonFormat can be used for separate conversion 

You need to comment out the time-zone in the .yml file

 

Then restart the project to verify that the time conversion is correct:

#### If there is something wrong, please give more pointers and leave a message. If there is a better way, everyone is welcome to leave a comment. 

Guess you like

Origin blog.csdn.net/kking_Ran/article/details/128038013