1.在配置文件中,设置MySQL的时区
url: jdbc:mysql://localhost:3306/mx?useSSL=false&serverTimezone=Asia/Shanghai
2.application.properties 配置新增
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
spring.jackson.serialization.write-dates-as-timestamps=false