`

No CurrentSessionContext configured 错误的解决

阅读更多
配置文件的问题
解决如下:
    在集成Hibernate的环境下(例如Jboss),在hibernate.cfg.xml中session-factory段加入:
        <property name="current_session_context_class">jta</property>
    在不集成Hibernate的环境下(例如使用JDBC的独立应用程序),在hibernate.cfg.xml中session-factory段加入:

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

相关推荐

Global site tag (gtag.js) - Google Analytics