插入时间和修改时间不正确,没有设置服务器时区
原配置信息:
url: jdbc:mysql://ip:3306/数据库?useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false
添加的code:注意&符号
&serverTimezone=Asia/Shanghai
更改后配置信息:
url: jdbc:mysql://ip:3306/数据库?useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai