报错The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time zone

The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

时区报错在配置properties文件时

jdbc.url=jdbc:mysql://localhost:3306/数据库名?useUnicode=true&characterEncoding=utf8&useSSL=false

加上

serverTimezone=UTC
UTC代表的是全球标准时间

猜你喜欢

转载自blog.csdn.net/qq_40417251/article/details/114532342