2015-11-08 31 views
0

enter image description here的ClassPathXmlApplicationContext找不到XML文件

没有找到
ApplicationContext context = new ClassPathXmlApplicationContext("springTest/BeanTest.xml"); 

抛出文件例外。谁能帮忙?

+0

你能做到 “的classpath *:springTest/BeanText.xml”? –

+0

创建'ClassPathXmlApplicationContext'的代码在哪里?如果它在'src/main/resources'中的类中,它将无法在'src/test'中看到这些文件。 –

回答

0

请把BeanTest.xml在src/main/resources目录的,而不是检验目录,并尝试

+0

我发现自己很愚蠢。这不是文件未发现异常。这是关于豆......抱歉的家伙。 – Bill