java 连接数据库问题The server time zone value ‘�й���ʱ��’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver
数据库连接时已经设置server time zone为UTC,去网上查的时候查到数据库连接时的URL后面添加serverTimezone=UTC,试了一下果然行
原本url
<property name="url" value="jdbc:mysql://localhost:3306/mybatis?useSSL=true&useUnicode=true&characterEncoding=utf8"/>
现在url
<property name="url" value="jdbc:mysql://localhost:3306/mybatis?useSSL=true&serverTimezone=UTC&useUnicode=true&characterEncoding=utf8"/>`