org.hibernate.HibernateException: No CurrentSessionContext configured!
hibernate可以通过两种方式获得Session: getCurrentSession() 和openSession().
当通过getCurrentSession()方法时,需要在 hibernate.cfg.xml配置文件中添加: <property name="current_session_context_class">thread</property>

浙公网安备 33010602011771号