???

作者: 359c7a79d70f | 来源:发表于2016-07-10 22:45 被阅读7次
    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>

    相关文章

      网友评论

          本文标题:???

          本文链接:https://www.haomeiwen.com/subject/omwdjttx.html