java - Spring: How to load @ContextConfiguration from jar classpath? I get FileNotFoundException -


I have a X project that has wireup.xml As follows:

  X / module / src / main / resource / com.here/ wireup.xml   

I import module < / Code Project X in project Y as

  & lt; Dependency & gt; & Lt; Group & gt; Com.org.X & lt; / Group & gt; & Lt; ArtifactId & gt; Module & lt; / ArtifactId> & Lt; Version & gt; Master-snapshot and lt; / Edition & gt; & Lt; / Dependencies & gt;   

Now in the trial, I need a bean that is in wireup.xml , so I do the following:

  @ RunWith (SpringJUnit4ClassRunner.class) @ContextConfiguration (places = {"classpath: com / org / x / module / src / main / resources / com / here / wireup.xml"}) Public square MongoSaverTest enhances case {@Autowired Private SomeBeanInWireup Variables; }   

But I get an error when I run the test saying this by: by: java.io.FileNotFoundException: class path resource [com / org / X / module / src / main / resources / com / here / wireup.xml] can not be opened because it does not exist

How can I fix it? How can I know the right path?



Comments