1.
#时间以及时区配置
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/表名?characterEncoding=utf8&useUnicode=true&useSSL=false&serverTimezone=GMT%2b8
参考博主的:解决通过Date()获取时间存入数据库少“8”小时_奎咄的博客-CSDN博客
2.
建议先用这个,我是用这个解决的
utf-8&serverTimezone=GMT%2B8
url: jdbc:mysql://192.168.2.8:3306/....=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
url: jdbc:mysql://192.168.2.8:3306/....=true&characterEncoding=utf8&serverTimezone=GMT%2B8
仿照博主: