微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

错误信息:

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">-->

xmlns="http://www.springframework.org/schema/beans"
在xsi:schemaLocation中没有,对应的 xsd 解析文件

添加相应的xsd即可

            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">-->

xmlns="http://www.springframework.org/schema/beans"
在xsi:schemaLocation中没有,对应的 xsd 解析文件

原文地址:https://www.jb51.cc/xml/294119.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。