如果我在Hibernate中使用JPA,我的项目应该具有哪些依赖关系? [英] what dependencies my project should have if I'm using JPA in Hibernate?
本文介绍了如果我在Hibernate中使用JPA,我的项目应该具有哪些依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用JPA和Hibernate作为它的实现。什么 maven2
依赖关系I need 在我的项目中有什么用途?
I use JPA, and Hibernate as its implementation. What maven2
dependencies I need to have in my project?
推荐答案
我相信你需要的只有两件事是hibernate的entitymanager,然后是SLF4J日志包之一。其他所有内容都应该作为依赖项引入:
I believe the only two things you need are hibernate's entitymanager and then one of the SLF4J logging bundles. Everything else should be pulled in as dependencies:
<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>
这篇关于如果我在Hibernate中使用JPA,我的项目应该具有哪些依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文