spring
共 1 篇文章
Spring Junit 读取WEB-INF下的配置文件
测试环境:Spring3.0.5 + Junit4.8.1 配置文件放在class目录下: ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml"); WEB-INF下: ApplicationContext applicationContext = new FileSystemXmlApplicationContext("WebRoot/WEB-INF/spring.xml"); 注解方式: class: @ContextConfiguration(locations={…
2011-10-20 10:36 · spring