当前位置:   article > 正文

Cannot find class: com.mysql.jdbc.Driver报错解决

cannot find class: com.mysql.jdbc.driver

maven中更换依赖版本从5.1.47更换为8.0.15正常,但是报了警告: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.

按照提示中所说将mybatis配置文件中

<property name="driver" value="com.mysql.jdbc.Driver"/>

修改为

<property name="driver" value="com.mysql.cj.jdbc.Driver"/>

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/618443
推荐阅读
相关标签
  

闽ICP备14008679号