Created
October 31, 2012 10:54
-
-
Save odrotbohm/3986414 to your computer and use it in GitHub Desktop.
Using JavaConfig and XML configuration in Spring integration tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(SpringJUnit4ClassRunner.class) | |
@ContextConfiguration | |
public class MyTest { | |
@Configuration | |
@ImportResource("classpath:META-INF/spring/application-context.xml") | |
static class Config { | |
// JavaConfig goes here | |
} | |
// Tests go here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is working for resources in test directory or main? Because I got this error:
Caused by: java.io.FileNotFoundException: class path resource [WEB-INF/applicationContext.xml] cannot be opened because it does not exist