IOException parsing XML document from class path resource [bean.xml]; nested exceptionis java.io.Fil

报错

IOException parsing XML document from class path resource [bean.xml]; nested exceptionis java.io.FileNotFoundException: class path resource [bean.xml] cannot be opened because it does not exist

ApplicationContext 	context=new ClassPathXmlApplicationContext("bean.xml");

出现这个问题的原因是找不到配置文件bean.xml

解决

我们将我们的xml文件放在src目录下面就可以了,不要放在文件包里面。


猜你喜欢

转载自blog.csdn.net/qq_41147260/article/details/81016896
今日推荐