我有一个名为的项目X
,其wireup.xml
布局如下:
X/
Module/
src/
main/
resources/
com.here/
wireup.xml
我 导入Module
为project X
_project Y
<dependency>
<groupId>com.org.X</groupId>
<artifactId>Module</artifactId>
<version>master-SNAPSHOT</version>
</dependency>
现在在测试中我想要 bean wireup.xml
,所以我执行以下操作:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:com/org/X/Module/src/main/resources/com/here/wireup.xml"})
public class MongoSaverTest extends Case {
@Autowired
private SomeBeanInWireup variable;
}
但是我在运行测试时遇到错误说
Caused by: java.io.FileNotFoundException: class path resource [com/org/X/Module/src/main/resources/com/here/wireup.xml] cannot be opened because it does not exist
我怎样才能解决这个问题?我怎样才能知道正确的路径?