Connection is read-only. Queries leading to data

来源:互联网 发布:linux js代码美化 编辑:程序博客网 时间:2024/06/05 15:29
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> 
<property name="sessionFactory" ref="sessionFactory"></property> 
</bean> 


<tx:advice id="txAdvice"  > 
<tx:attributes> 
<tx:method name="save*" propagation="REQUIRED"/> 
<tx:method name="update*" propagation="REQUIRED"/> 
<tx:method name="del*" propagation="REQUIRED"/> 
<tx:method name="checked*" propagation="REQUIRED"/> 
<tx:method name="*" read-only="true" propagation="REQUIRED"/> 
</tx:attributes>
</tx:advice> 


<aop:config> 
<aop:pointcut expression="execution(* com.gsh.service.impl.*.*(..))" id="aopPointcut"/> 
<aop:advisor advice-ref="txAdvice" pointcut-ref="aopPointcut"/>

</aop:config>


spring事务影响

改成

 read-only="false" 

0 0