项目本来是 oracle 驱动 + druid 数据源配置,现在要修改为 mysql+druid数据源配置

启动项目的时候报:java.sql.SQLException: com.mysql.jdbc.Driver

java.sql.SQLException: com.mysql.jdbc.Driver

 

报错原因是项目中,没有 mysql 驱动的jar,缺少 jdbc 对mysql的jar。

 pom.xml 中,加入 mysql 驱动的jar

<dependency>
   <groupId>mysql</groupId>
   <artifactId>mysql-connector-java</artifactId>
   <version>5.1.38</version>
</dependency>

重新编译就可以了

posted on 2018-06-28 20:25 【cosmo】 阅读(...) 评论(...) 编辑 收藏

相关文章:

  • 2021-08-11
  • 2021-12-10
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-25
  • 2022-01-22
  • 2021-04-24
  • 2021-04-21
相关资源
相似解决方案