???

2016-07-10  本文已影响7人  359c7a79d70f
clipboard.png
<!-- 事务拦截配置 --><tx:advice id="txAdvice" transaction-manager="transactionManager">
    <tx:attributes>
        <tx:method name="get*" read-only="true" rollback-for="Throwable"/>
        <tx:method name="*" rollback-for="Throwable"/>
    </tx:attributes>
</tx:advice>
<!-- 业务IABO AOP配置 -->
<aop:config>
    <!-- IABO拦截规则定义 -->
    <aop:pointcut id="iaboOperation" expression="${transaction.expression}"/>
    <aop:pointcut id="tjiaboOperation" expression="${tjtransaction.expression}"/>
    <aop:pointcut id="hjiaboOperation" expression="${hmtransaction.expression}"/>
    <!-- IABO事务拦截配置 -->
    <aop:advisor advice-ref="txAdvice" pointcut-ref="iaboOperation" order="1"/>
    <aop:advisor advice-ref="txAdvice" pointcut-ref="tjiaboOperation" order="3"/>
    <aop:advisor advice-ref="txAdvice" pointcut-ref="hjiaboOperation" order="5"/>
    <!-- IABO方法事务内拦截,记录请求日志、数据操作日志 -->
    <aop:advisor advice-ref="iaboMethodInterceptor" pointcut-ref="iaboOperation" order="2"/>
    <aop:advisor advice-ref="iaboMethodInterceptor" pointcut-ref="tjiaboOperation" order="4"/>
    <aop:advisor advice-ref="iaboMethodInterceptor" pointcut-ref="hjiaboOperation" order="6"/>
</aop:config>
上一篇下一篇

猜你喜欢

热点阅读