我使用 JPA 和 Hibernate 作为其实现。我的项目需要有哪些maven2
依赖项?
最佳答案
我相信您需要的唯一两件事是 hibernate 的实体管理器,然后是 SLF4J 日志记录包之一。其他一切都应该作为依赖项引入:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.5.1-Final</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<!-- version 1.5.8 is the latest version that will work with the slf4j-api
that's currently bundled with hibernate-parent -->
<version>1.5.8</version>
</dependency>
关于java - 如果我在 Hibernate 中使用 JPA,我的项目应该有哪些依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3814761/