org.hibernate.HibernateException: getFlushMode is not valid without active transaction

Spring & Hibernate 整合异常记录:

org.hibernate.HibernateException: getFlushMode is not valid without active transaction

原因 <prop key="hibernate.current_session_context_class">thread</prop> 注释该配置即可。

原文地址:https://www.cnblogs.com/hanleytang/p/4618562.html