Create session factory in Hibernate 4

前端 未结 8 2269
猫巷女王i
猫巷女王i 2020-11-30 19:13

I\'m having trouble generating a session factory in Hibernate 4. In Hibernate 3 I simple did:

org.hibernate.cfg.Configuration conf= HibernateUtil
    .getLim         


        
8条回答
  •  伪装坚强ぢ
    2020-11-30 19:48

    Even there is an update in 4.3.0 API. ServiceRegistryBuilder is also deprecated in 4.3.0 and replaced with the StandardServiceRegistryBuilder. Now the actual code for creating the session factory would look this example on creating session factory.

提交回复
热议问题