解决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.
解决方式:
报错意思就是说com.mysql.jdbc.Driver这个驱动已经被弃用了,新的驱动为com.mysql.cj.jdbc.Driver,通常是自动注入的。
所以,我们只需要按照提示,将“com.mysql.jdbc.Driver”驱动改为“com.mysql.cj.jdbc.Driver”。
<property name="driver" value="com.mysql.cj.jdbc.Driver"/>
x 标签:jdbc,Driver,driver,mysql,com,class From: https://www.cnblogs.com/hongmaju/p/16738402.html