Hibernate org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role:

前端 未结 3 1594
失恋的感觉
失恋的感觉 2021-01-05 11:25

I have the below mentioned Entity classes, when I execute my application I am getting the following exception. Some of the other similar questions didn\'t solve the problem.

3条回答
  •  盖世英雄少女心
    2021-01-05 11:53

    I have resolved the issue by adding the following in web.xml

    
    OpenEntityManagerInViewFilter
    org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
    
    
    OpenEntityManagerInViewFilter
    /*
    
    

    courtesy here and here

    Thanks

提交回复
热议问题