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

一般情况下: 

  1. @ContextConfiguration(Locations="../applicationContext.xml")   

多个文件时,可用{}

  1. @ContextConfiguration(locations = { "classpath*:/spring1.xml", "classpath*:/spring2.xml" })   
posted @ 2017-06-18 19:52  李慕白520  阅读(358)  评论(0编辑  收藏  举报