web. 找不到spring-mvc. 文件

异常信息如下:

12月 18, 2018 4:08:16 下午 org.spring work.web.servlet.DispatcherServlet initServletBean
严重: Context initialization failed
org.spring work.beans.factory.BeanDefinitionStoreException: IOException parsing   document from ServletContext resource [/classpath:spring-mvc. ]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/classpath:spring-mvc. ]
	at org.spring work.beans.factory. . BeanDefinitionReader.loadBeanDefinitions( BeanDefinitionReader.java:344)
	at org.spring work.beans.factory. . BeanDefinitionReader.loadBeanDefinitions( BeanDefinitionReader.java:304)
	at org.spring work.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
	at org.spring work.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
	at org.spring work.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
	at org.spring work.web.context.support. WebApplicationContext.loadBeanDefinitions( WebApplicationContext.java:125)
	at org.spring work.web.context.support. WebApplicationContext.loadBeanDefinitions( WebApplicationContext.java:94)
	at org.spring work.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
	at org.spring work.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:609)
	at org.spring work.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:510)
	at org.spring work.web.servlet. workServlet.configureAndRefreshWebApplicationContext( workServlet.java:667)
	at org.spring work.web.servlet. workServlet.createWebApplicationContext( workServlet.java:633)
	at org.spring work.web.servlet. workServlet.createWebApplicationContext( workServlet.java:681)
	at org.spring work.web.servlet. workServlet.initWebApplicationContext( workServlet.java:552)
	at 

文件位置如下:

\"\"

我的web. 如下:

\"\"

解决方案:

在网上百度半天,

IOException parsing document from ServletContext resource [/classpath:spring-mvc. ]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/classpath:spring-mvc. ]

知道这个是找不到spring的配置文件问题,但是我左改右改都没成功,然后复制人家代码classpath:就没报错

于是我发现原来是冒号用了中文

浪费2小时原来因为一个标点。。。。气哭在厕所。。。

下面才是对的:

\"\"

 

这个距离稍微短点。。。所以说以后写代码还是要注意点,当找不到错误时,也许是标点问题,还可能是空字符问题。。。

收藏 打印