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
这个是你ecpilse 工作空间有中文导致的,不要将你的工程路径设置在有中文的文件夹下,会导致加载不到WEB-INF路径。改成classpath*:这种形式可以访问到xml文件,但是在返回jsp页面时又会包404错误。
路径改成classpath*:/.xml 。对了你解决了没? 我这里有404错误能帮我看看嘛?我发提问了
工程目录千万不要有中文!!
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)