No Session found for current thread:没有找到当前线程的会话.
这个问题我是在整合Spring时出现的。
问题很好解决,在Hibernate的配置文件hibernate.cfg.xml中加入这
样一条配置就好。
<property name="current_session_context_class">thread</property>
Good Job!!!
本文介绍了解决在Spring整合过程中遇到的NoSession错误的方法。通过在hibernate.cfg.xml配置文件中添加一行代码即可轻松解决问题。
No Session found for current thread:没有找到当前线程的会话.
这个问题我是在整合Spring时出现的。
问题很好解决,在Hibernate的配置文件hibernate.cfg.xml中加入这
样一条配置就好。
<property name="current_session_context_class">thread</property>
Good Job!!!

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