Я использую Spring 4.0 в своем приложении JavaEE, и я попытался использовать Spring-data-jpa.Использование Spring 4.0 с spring-data-jpa
Однако, когда я добавляю зависимость Spring-data-jpa, я обнаружил, что Spring-data-jpa будет зависеть от Spring-3.x.
Тогда мне интересно, это вызовет любую проблему? Так как мое приложение будет иметь Spring-4.x с Spring-3.x.
У кого-то есть такой же опыт?
Update:
Я использую Весна-данных JPG-1.4.3:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.4.3.RELEASE</version>
</dependency>
Но когда я бегу mvn dependency:tree
я получил это:
+- org.springframework:spring-context:jar:4.0.0.RELEASE:compile
| +- org.springframework:spring-beans:jar:4.0.0.RELEASE:compile
| +- org.springframework:spring-core:jar:4.0.0.RELEASE:compile
| | \- commons-logging:commons-logging:jar:1.1.1:compile
| \- org.springframework:spring-expression:jar:4.0.0.RELEASE:compile
+- org.springframework:spring-aop:jar:4.0.0.RELEASE:compile
| \- aopalliance:aopalliance:jar:1.0:compile
+- org.springframework.data:spring-data-jpa:jar:1.4.3.RELEASE:compile
| +- org.springframework.data:spring-data-commons:jar:1.6.3.RELEASE:compile
| +- org.springframework:spring-orm:jar:3.1.4.RELEASE:compile
| | \- org.springframework:spring-jdbc:jar:3.1.4.RELEASE:compile
| +- org.springframework:spring-tx:jar:3.1.4.RELEASE:compile
| +- org.aspectj:aspectjrt:jar:1.7.2:compile
| +- org.slf4j:slf4j-api:jar:1.7.1:compile
| \- org.slf4j:jcl-over-slf4j:jar:1.7.1:runtime
+- org.aspectj:aspectjweaver:jar:1.7.4:compile
+- org.springframework:spring-test:jar:4.0.0.RELEASE:test
It кажется, что весна 4.0 .. смешивается с пружиной 3.1.4.
Никогда не смешивайте пружинные версии, беда ждет, чтобы случиться. В Spring Spring 1.4.x ветка должна отлично работать с Spring 4. –
@ M.Deinum: Я обновляю свой пост. – hguser