我在尝试集成
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,现在一切都运行得很好……