由于中提到的问题: Why not to use Spring's OpenEntityManagerInViewFilter
和
http://heapdump.wordpress.com/2010/04/04/should-i-use-open-session-in-view/
我想使用 Springs OpenentityManagerInViewFilter 的替代方案。这绝对是一个性能问题。如果我禁用 OpenentityManagerInViewFilter 我偶尔会收到错误:
LazyInitializationException:42 - failed to lazily initialize a collection