我创建了一个简单的CRUD应用程序,它使用了JPA和Hibernate。
我有实体注释JPA javax.persistence.@entity
注释和hibernate配置文件(hibernate.cfg.xml)
。
我不使用JPA实体管理器而不是使用Hibernate Native API (Session, Session Factory, HibernateUtil)
。
我没有hibernate映射文件和persistence.xml
。
有任何问题。
请帮忙。
答案 0 :(得分:0)
在使用JPA注释时,您不需要拥有映射文件。但是当然你必须有persistence.xml,除非你使用的是Spring 3.1 LocalContainerEntityManagerFactoryBean类。