您的位置:首页 > 其它

ested exception is org.xml.sax.SAXParseException; lineNumber: 23; columnNumber: 106; cvc-elt.1: 找不到

2017-06-18 21:19 495 查看

错误信息:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 23 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException;
lineNumber: 23; columnNumber: 106; cvc-elt.1: 找不到元素 'beans' 的声明。

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">-->[/code] 
xmlns="http://www.springframework.org/schema/beans"


在xsi:schemaLocation中没有,对应的 xsd 解析文件

添加相应的xsd即可

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">-->[/code] 
xmlns="http://www.springframework.org/schema/beans"


在xsi:schemaLocation中没有,对应的 xsd 解析文件
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐