The server time zone value ‘�й���ʱ��‘ is unrecognized or represents…
原因可能是spring-boot-starter-parent 1.5.9.RELEASE和2.2.5.RELEASE依赖的mysql-connect-java的版本不同。2.2.5版本的mysql-connect的版本超过6.0。
如果使用2之上的版本,则需要在修改驱动为com.mysql.cj.jdbc.Driver,
并且需要指定时区spring.datasource.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
就是在数据库名后加上serverTimezone=Asia/Shanghai
boot使用中的数据库错误:链接失败,时区解析失败The server time zone value ‘�й���ʱ��‘ is unrecognized or represents...
最新推荐文章于 2021-12-05 14:10:44 发布