无法将名称 'repository:repository' 解析为 (n) 'type definition' 组件. [英] Cannot resolve the name 'repository:repository' to a(n) 'type definition' component.

查看:67
本文介绍了无法将名称 'repository:repository' 解析为 (n) 'type definition' 组件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试集成 Spring Data 时遇到此错误.完整的堆栈跟踪是

I am getting this error while trying to integrate Spring Data. The full stack trace is

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 文件时遇到了同样的问题.

I had the same problem with the XSD file.

我已将 Spring Data Commons 1.4 更改为 Spring Data Commons 1.3.2,现在一切正常...

I've changed my Spring data Data Commons 1.4 to Spring Data Commons 1.3.2 and everything works perfectly fine now...

这篇关于无法将名称 'repository:repository' 解析为 (n) 'type definition' 组件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆