hibernate.cfg.xml:在session-factory段加入:
<property name="Hibernate.current_session_context_class">thread</property>
引入2篇帖子:
http://hi.baidu.com/shjiegun/blog/item/8e230dd354bbbb0b3bf3cf1f.html
http://esffor.iteye.com/blog/96395
<property name="Hibernate.current_session_context_class">thread</property>
引入2篇帖子:
http://hi.baidu.com/shjiegun/blog/item/8e230dd354bbbb0b3bf3cf1f.html
http://esffor.iteye.com/blog/96395
本文介绍如何在Hibernate配置文件hibernate.cfg.xml中设置线程级别的当前会话上下文,通过在session-factory段落中加入特定属性来实现。此配置对于整合Hibernate与其他框架(如Spring)非常重要。
1651

被折叠的 条评论
为什么被折叠?



