Reputation: 209
I want to load my Spring application context via annotations like this:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "file:/path/to/spring-context1.xml", "file:/path/to/spring-context2.xml"})
I am trying this because the context file is not in my classpath. I've read several times that this was possible but it does not seem to work. So my question is: "Is this really possible and am I doing something wrong?
I've got another question if this happens to be possible: if I want to use a relative path instead of an absolute one, from where should it be relative? From the pom.xml location?
Upvotes: 3
Views: 174
Reputation: 209
As said in the comments of my first post, the problem came from me ;) So the answers are :
Hope this helps.
Upvotes: 1