Cannot find class [org.apache.commons.dbcp.BasicDataSource]

时间:2021-07-10 21:22:05

Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name ‘dataSource‘ defined in class path resource 

错误原因:缺少两个jar包

Cannot find class [org.apache.commons.dbcp.BasicDataSource]

 

 获得jar包方法:从maven仓库下载

网址:https://mvnrepository.com/

Cannot find class [org.apache.commons.dbcp.BasicDataSource]

 Cannot find class [org.apache.commons.dbcp.BasicDataSource]

 

 下载需要的jar包,复制到lib目录下右击项目添加到工程中。

Cannot find class [org.apache.commons.dbcp.BasicDataSource]

 

 

Cannot find class [org.apache.commons.dbcp.BasicDataSource]