No session currently bound to execution context

前端 未结 2 1599
无人共我
无人共我 2021-02-18 19:58

I got below exception when I used session.getCurrentSession().

I have mentioned

hibernate.current_session_context_class: managed

org         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-02-18 20:38

    If you are using Dropwizard Hibernate. You need to add @UnitOfWork annotation to your Resource method. More info within dropwizard manual, hibernate chapter.

提交回复
热议问题