出现此错误的原因是时区出现错误
解决方案:
可以在数据库中设置
show variables like '%time_zone%';
set global time_zone='+8:00';
也可以在连接数据库的url中设置
jdbc:url=jdbc:mysql://localhost:3306/mybatisplus?characterEncoding=utf8&serverTimezone=GMT%2B8
在后面加上serverTimezone=GMT%2B8
出现此错误的原因是时区出现错误
解决方案:
可以在数据库中设置
show variables like '%time_zone%';
set global time_zone='+8:00';
也可以在连接数据库的url中设置
jdbc:url=jdbc:mysql://localhost:3306/mybatisplus?characterEncoding=utf8&serverTimezone=GMT%2B8
在后面加上serverTimezone=GMT%2B8