为了账号安全,请及时绑定邮箱和手机立即绑定

mvn jetty:run 后一直报 Could not open ServletContext resource [/WEB-INF/configs/spring/mvc-dispatcher-servlet.xml]

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/configs/spring/mvc-dispatcher-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletCo

正在回答

4 回答

这个是你ecpilse 工作空间有中文导致的,不要将你的工程路径设置在有中文的文件夹下,会导致加载不到WEB-INF路径。改成classpath*:这种形式可以访问到xml文件,但是在返回jsp页面时又会包404错误。

0 回复 有任何疑惑可以回复我~

路径改成classpath*:/.xml 。对了你解决了没? 我这里有404错误能帮我看看嘛?我发提问了

0 回复 有任何疑惑可以回复我~

工程目录千万不要有中文!!

2 回复 有任何疑惑可以回复我~

Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/configs/spring/mvc-dispatcher-servlet.xml]
    at org.springframework.web.context.support.ServletContextResource.getInputStream (ServletContextResource.java:141)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (XmlBeanDefinitionReader.java:330)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (XmlBeanDefinitionReader.java:304)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions (AbstractBeanDefinitionReader.java:181)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions (AbstractBeanDefinitionReader.java:217)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions (AbstractBeanDefinitionReader.java:188)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions (XmlWebApplicationContext.java:125)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions (XmlWebApplicationContext.java:94)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory (AbstractRefreshableApplicationContext.java:129)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory (AbstractApplicationContext.java:537)
    at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:452)
    at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext (FrameworkServlet.java:663)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext (FrameworkServlet.java:629)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext (FrameworkServlet.java:677)
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext (FrameworkServlet.java:548)
    at org.springframework.web.servlet.FrameworkServlet.initServletBean (FrameworkServlet.java:489)
    at org.springframework.web.servlet.HttpServletBean.init (HttpServletBean.java:136)

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

mvn jetty:run 后一直报 Could not open ServletContext resource [/WEB-INF/configs/spring/mvc-dispatcher-servlet.xml]

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信