Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb
程序员文章站
2024-03-14 16:57:16
...
启动了下别人的项目,报错
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.
java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time
下面接着还报了几个rabbitmq线程warn,好怕怕哦,这可咋整。属实把人家吓坏了呢。
解决:
按他说的,把.yml里
spring:
datasource:
url: jdbc:mysql://localhost:3306/tfboys
driverClassName: com.mysql.jdbc.Driver
username: root
password: 123456
换成
spring:
datasource:
url: jdbc:mysql://localhost:3306/tfboys?serverTimezone=UTC
driverClassName: com.mysql.cj.jdbc.Driver
username: root
password: 123456
就完事了。
上一篇: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb
下一篇: STM32新手入门教程
推荐阅读
-
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb
-
Loading class `com.mysql.jdbc.Driver'. This is deprecated.
-
spring boot单元测试类的使用.Loading class `com.mysql.jdbc.Driver'. This is deprecated.
-
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb
-
Loading class `com.mysql.jdbc.Driver'. This is deprecated 警告异常
-
Loading class `com.mysql.jdbc.Driver'. This is deprecated 警告异常