SpringMVC解决视图懒加载问题

在web.xml文件中加入相关的过滤器即可

<!-- 解决视图懒加载 -->
  <!-- org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter -->
  <filter>
      <filter-name>oemiv</filter-name>
      <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
  </filter>
  <filter-mapping>
      <filter-name>oemiv</filter-name>
      <url-pattern>/*</url-pattern>
  </filter-mapping>

 

posted @ 2017-06-14 20:14  黑曼巴LGLG  阅读(303)  评论(0编辑  收藏  举报