`

解决HIbernate3运行出现No CurrentSessionContext configured!错误

阅读更多
解决HIbernate3运行出现No CurrentSessionContext configured!错误



原因在修改配置文件:hibernate.cfg.xml

根据运行环境添加如下配置:

1)在容器中运行:

     <property name="current_session_context_class">jta</property>

2) 独立运行:

     <property name="current_session_context_class">thread</property>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics