在 STS 中配置 Spring Data 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"?>
删除时错误消失
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd
从
<beans ...>
和
<jpa:repositories ... />
来自 XML 的标记。