提示错误:
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
原因:
出现该问题是因为,运行springboot时jdbc驱动包报错,通过上网查询发现是jdbc依赖版本的问题,我查看了pom文件发现jdbc依赖的版本是8.x的版本。
解决办法:
版本更改成了5.X.X,启动就不报错了。

本文解决了一个关于SpringBoot应用程序中使用不正确版本的MySQL JDBC驱动导致的启动错误问题。作者发现使用8.x版本的驱动会出现加载警告,并通过将依赖更改为5.X.X版本成功解决了这一问题。

1万+

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



