Spring 学习之错误收集及解决方案

来源:互联网 发布:eric python 编辑:程序博客网 时间:2024/05/22 15:01

最近在学习spring3.x,搭建一个项目后,各种报错,各种调,各种添加jar,收集一下遇到的问题,希望在这里能解决掉你的麻烦。

1、The prefix "context" for element"context:component-scan" is not bound.

解决方案:

在<beans></beans>里添加xmlns:context=http://www.springframework.org/schema/context

2、The type org.springframework.dao.DataAccessExceptioncannot be resolved. It is indirectly referenced from required .class files

解决方案:

导入spring.transaction-3.0.5.jar 包就好了

3、Class'org.apache.commons.dbcp.BasicDataSource' not found

解决方案:

缺少commons-dbcp.jar



0 0
原创粉丝点击