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 中如果要使用sessionFactory.getCurrentSession();
那么在hibernate的配置文件中就要加上这段
<property name="current_session_context_class" >thread</property>
上一篇: 腌黄瓜的功效和作用
下一篇: CXF调用webservice报错