标签:
hibernate可以通过两种方式获得Session: getCurrentSession() 和openSession().
当通过getCurrentSession()方法时,需要在 hibernate.cfg.xml配置文件中添加: <property name="current_session_context_class">thread</property>
org.hibernate.HibernateException: No CurrentSessionContext configured!
标签:
原文地址:http://www.cnblogs.com/listened/p/4397979.html