您的位置:首页 > 编程语言 > Java开发

spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException

2018-04-06 00:55 603 查看
Tomcat容器启动失败,显示:      org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from class path resource [spring/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

  回头打开**.xml仔细看了下
<?xml version="1.0" encoding="UTF-8"?>

  竟然在文件开头多了一个空格,导致识别不了文件。不得不承认,有时候问题就是这么纠结而细微:在 <?xml前面有个不起眼的空格。 <?xml <?xml
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  spring
相关文章推荐