严重 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
org.springframework.web.context.ContextLoaderListener
contextConfigLocation classpath*:applicationContext.xml
listener和 都配的没有问题,却一直报java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml 异常,此时tomcat能启动,但是工件FALSE。
分析:
因为我在pom文件中引入了spring-web依赖,需要重新部署web项目,我的想法需要将原来的web.xml删除,重新引入。
项目右键,打开模块设置
然后重新在部署描述符下重新引入web.xml。
再配置listener和 就不会报错了。
后端小白,欢迎大佬指正!



