mysql-connector-java 6.0.6

在SpringBoot里使用mysql-connector-java 6.0.6遇到的问题

1.maven依赖

mysql
mysql-connector-java
6.0.6
runtime

2.相关配置文件
datasource.driverClassName=com.mysql.jdbc.Driver
datasource.master.jdbcUrl=jdbc:mysql://localhost:3306/ymt360?useUnicode=true&characterEncoding=UTF-8

3.相关启动日志
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.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驱动类

4.配置文件修改为
datasource.driverClassName=com.mysql.cj.jdbc.Driver
datasource.slave.jdbcUrl=jdbc:mysql://localhost:3306/ymt360?serverTimezone=GMT%2B8&&useUnicode=true&characterEncoding=UTF-8&useSSL=false

5.说明
东八区时间
serverTimezone=GMT%2B8&
禁用SSL
useSSL=false

你可能感兴趣的:(mysql-connector-java 6.0.6)