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

前端之家收集整理的这篇文章主要介绍了xml – 无法将名称’repository:repository’解析为(n)’类型定义’组件.前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在尝试集成 Spring Data时遇到此错误.完整的堆栈跟踪是
  1. 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.
  2. at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
  3. at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
  4. at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)

XML文件

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

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

猜你在找的XML相关文章