hibernate实体类的注解Entity和Table、Id、Column、GeneratedValue引入的是javax.persistence.Entity;和javax.persistence.Table等;而不是org.hibernate.annotations.Entity;和org.hibernate.annotations.Table等;导入的包是ejb3-persistence.jar;GenericGenerator引入的是org.hibernate.annotations.GenericGenerator,导入的包是hibernate-annotations.jar

Hibernate JPA依赖的JAR包:
  1、Hibernate核心包(8个文件)
  hibernate-distribution-3.3.1.GA
  hibernate3.jar
  lib\bytecode\cglib\hibernate-cglib-repack-2.1_3..jar
  lib\required*.jar
  2、Hibernate注解包(3个文件)
  hibernate-annotations-3.4.0.GA
  hibernate-annotations.jar
  lib\ejb3-persistence.jar
  hibernate-commons-annotations.jar
  3、Hibernate针对JPA的实现包(3个文件)
  hibernate-entitymanager-3.4.0.GA
  hibernate-entitymanager.jar
  lib\test\log4j.jar
  slf4j-log4j12.jar

posted on 2017-08-21 16:37  cyy_13  阅读(523)  评论(0)    收藏  举报