1、问题原因
mysql时区识别出现错误
2、问题解决
在url 加上时区(serverTimezone)
url: jdbc:mysql://127.0.01:3306/user?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&**useSSL**=false&zeroDateTimeBehavior=convertToNull&**serverTimezone**=GMT%2B8
使用UTC (全球标准时间不会报错,但是我们是少了八个小时的,所以在数据库存入的时间就是有时差)
北京时间东八区
serverTimezone=GMT%2B8
或者使用上海时间
serverTimezone=Asia/Shanghai