spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException...
生活随笔
收集整理的這篇文章主要介紹了
spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException...
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Tomcat容器啟動失敗,找到 debug日志一看:
?Context initialization failed
? ? ?org.springframework. beans.factory.xml.XmlBeanDefinitionStoreException:Line 1 in XML document from file [spring-wlf.xml] is invalid;nested exception is org.xml.sax.SAXParseException:The processing instruction target matching "[xX][mM][1L]” is not allowed.
回頭打開spring-wlf.xml仔細看了下
<?xml version="1.0" encoding="UTF-8"?>竟然在文件開頭多了一個空格,導致識別不了文件。不得不承認,有時候問題就是這么糾結而細微:在<?xml前面有個不起眼的空格。
轉載于:https://www.cnblogs.com/wuxun1997/p/6375038.html
總結
以上是生活随笔為你收集整理的spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Microstation研发
- 下一篇: iOS之一个iOS开发人员完整的学习路线