Question:

SpringBoot2.0 consolidates Mybatis, a remote Linux mysql database, with data type datetime or date fields, and finds that 8 hours are lost.

Solutions:

Add the following configuration to apploAction. proterties

spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
Copy the code