赞
踩
Spring问题:class path resource [org.springapplicationContext.xml] cannot be opened。
Spring问题:org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [spring/root-context.xml]; nested exception is java.io.FileNotFoundException: class path resource [spring/root-context.xml] cannot be opened because it does not exist 。
字面意思是:spring路径下的root-context.xml文件不存在!这个就有点扯了。web.xml配置的没有问题,文件也是确实存在的。如果是用IDEA开发的话,会看到这行配置是红色警告的,当时没有注意。
怀疑没有把该目录加进来,资源没有被加载编译。选中项目,选择Open Module Settings,果然没有,选择红框Resources添加整个目录。
添加后的如下,完成!启动后没有报错,完美!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。