spring整合hibernate时,spring使用注解配置声明式事务,并且applicationContext.xml配置正确,
还出现save is not valid without active transaction错误
那么很有可能是你在hibernate.cfg.xml文件中配置了
<property name="current_session_context_class">thread</property>
只要删了这个就行了
spring整合hibernate时,spring使用注解配置声明式事务,并且applicationContext.xml配置正确,
还出现save is not valid without active transaction错误
那么很有可能是你在hibernate.cfg.xml文件中配置了
<property name="current_session_context_class">thread</property>
只要删了这个就行了