读书人

junit4 里 Spring 配置文件加载途径写

发布时间: 2012-07-31 12:33:46 作者: rapoo

junit4 里 Spring 配置文件加载路径写法

?

配置文件在src下:

@ContextConfiguration(locations = "classpath:applicationContext-*.xml")

?

配置文件在/WEB-INF下:

@ContextConfiguration(locations = "file:WebRoot/WEB-INF/applicationContext-*.xml")
?

读书人网 >开源软件

热点推荐