spring事务处理只读属性无法生效

环境:jetty
<bean id="transactionManagerJydb" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSourceJydb" />
</bean>
<tx:advice id="txAdviceJydb" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*" read-only="true"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="daoPointcutJydb" expression="execution(* *..jydb.*.*(..))" />
<aop:advisor pointcut-ref="daoPointcut" advice-ref="txAdvice"
order="1" />
</aop:config>

本来要将jydb下的dao都设置成只读,但是实际情况是读写一直都可以,不知道具体原因,挖坑,待解。

版权声明:本文为onlydo原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。