带STS的Spring数据JPA配置

带STS的Spring数据JPA配置,spring,sts-springsourcetoolsuite,spring-data-jpa,Spring,Sts Springsourcetoolsuite,Spring Data Jpa,在STS中配置Spring数据JPA时遇到以下问题 Referenced file contains errors (jar:file:/.../war/WEB-INF/lib/spring- context-3.0.RELEASE.jar!/org/springframework/context/config/spring-context-3.0.xsd). - Referenced file contains errors (jar:file:/.../war/WEB-INF/lib/s

在STS中配置Spring数据JPA时遇到以下问题

Referenced file contains errors (jar:file:/.../war/WEB-INF/lib/spring-
 context-3.0.RELEASE.jar!/org/springframework/context/config/spring-context-3.0.xsd). 
- Referenced file contains errors (jar:file:/.../war/WEB-INF/lib/spring-
 beans-3.0.RELEASE.jar!/org/springframework/beans/factory/xml/spring-beans-3.0.xsd). 
- Referenced file contains errors (jar:file:/.../war/WEB-INF/lib/spring-
 beans-3.0.RELEASE.jar!/org/springframework/beans/factory/xml/spring-tool-3.0.xsd)
我在applicationContext.xml文件的这个位置遇到这个错误

 <?xml version="1.0" encoding="UTF-8"?>




来自XML的标记。

查看该对话框

Window > Preferences > XML > XML CataLog
1.单击窗口>首选项并选择XML>XML目录

2.单击“添加”以创建新的目录条目

Details:
Location:   D:\...\spring-framework-3.0.5.RELEASE\projects\org.springframework.beans\src\main\resources\org\springframework\beans\factory\xml\spring-beans-3.0.xsd
Key type:   Schema location
Key:        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
必须配置xml文件第一行中有错误的其他.xsd文件

3.XML配置如下:

<beans xmlns="http://www.springframework.org/schema/beans"
    ...
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    ...
    ..."
>


4.编辑带有自动建议的
和其他元素。

您使用的是哪个STS版本?我还收到一条警告:命名空间[:处理程序类文件或依赖类的问题。位于位置]的NamespaceHandler类[org.springframework.data.jpa.repository.config.JpaRepositoryNameSpaceHandler]无效
Window > Preferences > XML > XML CataLog
Details:
Location:   D:\...\spring-framework-3.0.5.RELEASE\projects\org.springframework.beans\src\main\resources\org\springframework\beans\factory\xml\spring-beans-3.0.xsd
Key type:   Schema location
Key:        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
<beans xmlns="http://www.springframework.org/schema/beans"
    ...
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    ...
    ..."
>