Spring整合JUnit4测试时,使用注解引入多个配置文件

一般情况下:


@ContextConfiguration(Locations="../applicationContext.xml") 
多个文件时,可用{}

@ContextConfiguration(locations = { "classpath*:/spring1.xml", "classpath*:/spring2.xml" }) 

 
 

猜你喜欢

转载自blog.csdn.net/Architect_CSDN/article/details/90170017