问题描述:
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驱动类,Driver位置由com.mysql.jdbc.Driver 变为com.mysql.cj.jdbc.Driver
解决方式:
将数据配置文件里spring.datasource.driver-class-name=com.mysql.jdbc.Driver修改为如下
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
The driver is automatically registered via the SPI and manual loading of the[SpringBoot]
最新推荐文章于 2024-09-28 21:55:49 发布