spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException...
Tomcat容器啟動(dòng)失敗,找到 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仔細(xì)看了下
<?xml version="1.0" encoding="UTF-8"?>竟然在文件開頭多了一個(gè)空格,導(dǎo)致識(shí)別不了文件。不得不承認(rèn),有時(shí)候問題就是這么糾結(jié)而細(xì)微:在<?xml前面有個(gè)不起眼的空格。
轉(zhuǎn)載于:https://www.cnblogs.com/wuxun1997/p/6375038.html
總結(jié)
以上是生活随笔為你收集整理的spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Microstation研发
- 下一篇: iOS之一个iOS开发人员完整的学习路线