自己写的Filter实现ThreadLocal可以使延迟加载生效,
为什么使用配置文件配置的ThreadLocal:
<property name="hibernate.current_session_context_class">thread</property>
不能使用延迟加载呢,总提示session已经关闭?
为什么使用配置文件配置的ThreadLocal:
<property name="hibernate.current_session_context_class">thread</property>
不能使用延迟加载呢,总提示session已经关闭?
不知道你事务什么时候提交的