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

时间:2022-01-02 03:16:29

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]