How do I get my Spring-JUnit test to think its running in a GenericApplicationContext?
问题 I’m using Spring 3.2.6.RELEASE , JUnit 4.11 , and DWR 3.0.0-rc2 . My question is, when running a Spring-JUnit integration test, how can I simulate things being run in a org.springframework.context.support.GenericApplicationContext ? I tried this: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration({ "classpath:test-context.xml", "classpath:dwr-context.xml" }) @WebAppConfiguration public class MyServiceIT {} in which my “dwr-context.xml” file is set to be <?xml version="1.0" encoding