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.
警告代码:
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.
在查看日志的时候很诧异的发现这一行信息,于是乎…
原因:
可以从提示的字面意思看出,说的是mysql 的驱动类,位置改变了,这个…
解决方案:
将数据配置文件里jdbc.driver=com.mysql.jdbc.Driver这一条修改为
jdbc.driver=com.mysql.cj.jdbc.Driver
注意,是多了个cj..cj..cj..,然后保存后试一下,一切OK。
mysqljdbcjavadriverurl