运行时,发现项目正常运行后报警告: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.Drive’,所以在我们application配置文件中进行修改
这样下次运行时就不会再有警告了
Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is `com.mysql.cj.jdb
最新推荐文章于 2023-03-03 08:10:15 发布