核心提示:Spring配置文件xml头导致的错误Eclipse报错信息 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException...
Spring配置文件xml头导致的错误
Eclipse报错信息
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 3 in XML document from class path resource [spring-ioc.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 1; Content is not allowed in prolog.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
浏览器打开自己懒直接点击在网页复制xml文件头">原因:电脑上xml文件默认用浏览器打开,自己懒,直接点击在网页复制xml文件头。。。
xml文件用编辑方式打开是这样的:
从网页上复制下来变成这样的:
-