欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

hibernate4 No Session found for current thread

程序员文章站 2022-06-11 08:23:04
...
No Session found for current thread
这个是因为在hibernate 中如果要使用sessionFactory.getCurrentSession();
那么在hibernate的配置文件中就要加上这段
<property name="current_session_context_class" >thread</property>
相关标签: hibernate