spring测试加载web-inf上的配置文件

spring测试加载web-inf下的配置文件AbstractTransactionalDataSourceSpringContextTests使用spring集成测

spring测试加载web-inf下的配置文件

AbstractTransactionalDataSourceSpringContextTests使用spring集成测试时候可以通过以下方式载入WEB-INF下的配置文件:
Java代码

protected String[] getConfigLocations() {              return new String[] {                       "file:WebRoot/WEB-INF/applicationContext.xml"};          }  protected String[] getConfigLocations() {           return new String[] {                    "file:WebRoot/WEB-INF/applicationContext.xml"};       }

其中file:表示相对于项目根目录