xml – 无法将名称’repository:repository’解析为(n)’类型定义’组件.

前端之家收集整理的这篇文章主要介绍了xml – 无法将名称’repository:repository’解析为(n)’类型定义’组件.前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在尝试集成 Spring Data时遇到此错误.完整的堆栈跟踪是
nested exception is org.xml.sax.SAXParseException; systemId: http://www.springframework.org/schema/data/jpa/spring-jpa.xsd; lineNumber: 18; columnNumber: 48; src-resolve: Cannot resolve the name 'repository:repository' to a(n) 'type definition' component.
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)

XML文件

<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://www.springframework.org/schema/data/jpa"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/data/jpa
        http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">
    <repositories base-package="com.interviewedonline.poc.repositories" />
我在XSD文件中遇到了同样的问题.

我已将Spring数据Data Commons 1.4更改为Spring Data Commons 1.3.2,现在一切都运行得很好……

猜你在找的XML相关文章