使用junit测试SpringMVC
架包支持:junit.jar;org.springframework.test-3.1.0.RELEASE.jar
测试Dao基础类:JUnitDaoBase
测试action类继承它就可以了
Spring读取WEB-INF下配置文件的方法:
配置文件放在class目录下:view plaincopyprint?@ContextConfiguration(locations={"file:WebContent/WEB-INF/springMVCForm-servlet.xml"})
参考:
http://blog.csdn.net/yeohcooller/article/details/7631202
http://a52071453.iteye.com/blog/1559000
http://www.iteye.com/topic/828513
这几个帖子很详细很强大