用dbcp加载数据源的时候报错org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [or

来源:互联网 发布:数据库中的存储过程 编辑:程序博客网 时间:2024/06/05 11:34

spring配置文件中使用dbcp加载数据源的时候,要注意一点,dbcp的包要放齐,三个包,

 添加数据库连接池依赖 https://mvnrepository.com/artifact/commons-dbcp/commons-dbcp<dependency>  <groupId>commons-dbcp</groupId>  <artifactId>commons-dbcp</artifactId>  <version>1.4</version></dependency> https://mvnrepository.com/artifact/commons-pool/commons-pool<dependency>  <groupId>commons-pool</groupId>  <artifactId>commons-pool</artifactId>  <version>1.5</version></dependency> https://mvnrepository.com/artifact/commons-collections/commons-collections<dependency>  <groupId>commons-collections</groupId>  <artifactId>commons-collections</artifactId>  <version>3.2.1</version></dependency>
否则会报错

阅读全文
0 0
原创粉丝点击