升级后maven配置如下,
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
升级后启动警告:
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
提示驱动器类应该由com.mysql.jdbc.Driver 升级为com.mysql.cj.jdbc.Driver.
升级后如果jdbc_url中没有服务器时区信息报错如下,
java.sql.SQLException: 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.
在原来的 jdbc_url的最后加上 &serverTimezone=Asia/Shanghai。注:服务器时区根据自己的需求填