Get Hibernate SessionFactory from JPA's entityManagerFactory

前端 未结 4 1171
攒了一身酷
攒了一身酷 2021-02-01 05:35

I need a specific feature of hibernate that is StatelessSession and for that I need Hibernate\'s SessionFactory. The problem is I only have the entityManagerFactory. How can I g

4条回答
  •  旧巷少年郎
    2021-02-01 06:02

    I solved it by injecting it, defining the bean like this http://docs.spring.io/spring/docs/3.0.x/spring-framework-reference/html/orm.html#orm-session-factory-setup

提交回复
热议问题