Configuring OpenSessionInViewFilter with Spring 3 and Servlet 3

前端 未结 1 597
旧巷少年郎
旧巷少年郎 2021-02-04 09:13

i want to configure OpenSessionInViewFilter to able to use hibernate lazy initialization in view, so i added the filter definition in web.xml, but it doesn\'t work

相关标签:
1条回答
  • 2021-02-04 10:12

    It seems that the order in which the filter chain is constructed depends on the order that the filter-mapping elements appear.

    In other words, try putting filter-mapping of OpenSessionInViewFilter before any other filter-mapping.

    Good luck with that

    0 讨论(0)
提交回复
热议问题