【发布时间】:2017-12-30 05:42:30
【问题描述】:
我正在使用 spring boot 1.5 创建一个全新的项目,其中包含一个依赖实体模块(早在 2012 年就创建了)。
实体模块正在使用旧版本的休眠( 3.3.2 ),我不能 修改实体模块。
实体模块正在使用以下注释,该注释已被 Hibernate5 删除(Spring Boot 1.5 默认提供)
CollectionOfElements
MapKey
@ForeignKey
@IndexColumn
我知道我们可以在 Spring Boot 中使用不同版本的 jar,我尝试通过覆盖但它不起作用
任何帮助或指导都将受到高度评价,非常感谢
<!-- HIBERNATE OLDER VERSION COMPATIBILITY -->
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-annotations -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.4.0.GA</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-validator -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.1.0.GA</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate -->
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.2.GA</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-entitymanager -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.3.2.GA</version>
</dependency>
【问题讨论】:
-
你应该阅读这个:spring.io/blog/2016/04/13/…
标签: java spring jpa spring-boot spring-data-jpa