springAPI对事物支持之XML式配置
<tx:advice id="txAdvice" transaction-manager="transactionManager">
tx:attributes
<tx:method name="" propagation="REQUIRED" read-only="false" />
<tx:method name="find" propagation="SUPPORTS" read-only="true" />
</tx:attributes>
</tx:advice>
aop:config
<aop:pointcut id="pt1" expression="execution(* com.itheima.service.impl..(..))"></aop:pointcut>
<aop:advisor advice-ref="txAdvice" pointcut-ref="pt1"></aop:advisor>
</aop:config>

浙公网安备 33010602011771号