Rap*_*oth 5 xml eclipse spring spring-data
我有一个项目使用Spring(context,transaction,apect)4.1.6.RELEASE和spring-data-jpa 1.8.0.RELEASE并遇到奇怪的错误,假设是由xsd验证引起的.但是,我无法确定原因.奇怪的是,项目运行正常,我的所有bean都被正确识别.
我正在使用Eclipse luna和Spring Tools Suite插件
我从applicationContext.xml中删除了除"jpa:"行之外的所有内容,这会导致问题.已使用STS插件创建xml.
我试图从xsds中删除版本号,但没有成功.
我前段时间遇到了同样的问题,所有错误都是由jpa引起的,我将jpa配置移至新的配置文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
default-destroy-method="destroy"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.8.xsd">
<context:component-scan base-package="com.some.validator" />
<context:component-scan base-package="com.some.security.rest" />
<jpa:repositories base-package="com.some.repository.path"
entity-manager-factory-ref="entityManagerFactory" />
</beans>
Run Code Online (Sandbox Code Playgroud)
一些 Maven 导入:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.8.2.RELEASE</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
和spring框架版本
<org.springframework-version>4.1.7.RELEASE</org.springframework-version>
Run Code Online (Sandbox Code Playgroud)
尝试清理项目并使用 Maven 更新它
| 归档时间: |
|
| 查看次数: |
1367 次 |
| 最近记录: |