Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用Spring MVCwithOpenSessionInViewFilter并试图找到在 jsp 上获取惰性集合大小的最佳实践(不加载集合和LazyInitializationException)。有什么解决办法吗?
Spring MVC
OpenSessionInViewFilter
LazyInitializationException
要么使用专门的 HQL 查询来计算集合中的元素,要么使用额外的延迟获取,这可以使用@LazyCollection注释来启用。
@LazyCollection