The new driver class is `com.mysql.cj.jdbc.Driver'

SpringBoot +MyBatis自动生成mapper层代码时,报错:

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

发布了148 篇原创文章 · 获赞 70 · 访问量 9万+

猜你喜欢

转载自blog.csdn.net/loulanyue_/article/details/105148002