使用JDBC连接MySql时出现:The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one

翻译过来就是:如果希望利用时区支持,必须配置服务器或JDBC驱动程序(通过serverTimezone配置属性),以使用更特殊的时区值

解决方法:
在数据库连接地址添加?serverTimezone=UTC

spring.datasource.url=jdbc:mysql://127.0.0.1:3306/booksystem?serverTimezone=UTC

你可能感兴趣的:(后端)