spring AOP 配置

 

 

<tx:advice id="txAdvice" transaction-manager="transactionManager">
        <tx:attributes>
            <tx:method name="save*" propagation="REQUIRED" rollback-for="Exception" />
            <tx:method name="add*" propagation="REQUIRED" rollback-for="Exception" />
            <tx:method name="del*" propagation="REQUIRED" rollback-for="Exception" />
            <tx:method name="insert*" propagation="REQUIRED" rollback-for="Exception" />
            <tx:method name="update*" propagation="REQUIRED" rollback-for="Exception" />
        </tx:attributes>
    </tx:advice>
    <aop:config>
        <aop:advisor advice-ref="txAdvice"
            pointcut="execution(* com.ibm.common.generic.service..*.*(..))" />
        <aop:advisor advice-ref="txAdvice"
            pointcut="execution(* com.ibm.bas.mes.config.service..*.*(..))" />
        <aop:advisor advice-ref="txAdvice"
            pointcut="execution(* com.ibm.bas.mes.message.service..*.*(..))" />
        <aop:advisor advice-ref="txAdvice"
            pointcut="execution(* com.ibm.bas.rse.insm.service..*.*(..))" />
    </aop:config>

 

posted @ 2014-11-26 17:44  vv_online  阅读(209)  评论(0编辑  收藏  举报