今天在启动Springboot项目时,报了如下错误:
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连接驱动有问题。

只需将com.mysql.jdbc.Driver改成com.mysql.cj.jdbc.Driver 即可。

文章讲述了在启动Springboot项目时遇到的错误,该错误提示加载com.mysql.jdbc.Driver类已被弃用,应改为使用com.mysql.cj.jdbc.Driver。解决方案是更新配置文件中的数据库连接驱动为推荐的新驱动类。

1万+

被折叠的 条评论
为什么被折叠?



