Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb
程序员文章站
2024-03-14 16:57:22
...
启动springboot的时候,日志显示错误
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.cj.jdbc.Driver
重新启动,就ok了。
原因:
数据库驱动com.mysql.jdbc.Driver’已经被弃用了、应当使用新的驱动com.mysql.cj.jdbc.Driver’
上一篇: 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. 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 警告异常