zoukankan      html  css  js  c++  java
  • spring 标签

    <!-- 下面的是不涉及事务的 -->

    <aop:config>

      <aop:aspect>

        <aop:pointcut  id="add"   expressio="(* com.test.shop.service.*.add*(..))"   / >

        <aop:pointcut   id="del"  expression="(* com.test.shop.service.*.del*(..))" / >

        <aop:before  method="addAdvice" pointcut-ref="add"    />

        <aop:after     method="delAdvice"  pointcut-ref="del"  />

      </aop:aspect>

    </aop:config>

    Aspect是advice方法的生存对象,advice作用到哪些类的哪些方法上,通过规则pointcut来规范,逻辑上来说,advice  ,pointcut应该在同一个对象上出现,这也是在采用注解时,Aspect位于类名上,pointcut在无意义方法上,而Before、After(即Advice)在真正要用的方法上。


    <!-- 下面的是涉及事务的 -->

    <tx:advice  transaction-manager="transactionManager">
      <tx:attributes>
        <tx:method name="" propagation="REQUIRED" />
        <tx:method name="" propagation="REQUIRED" />
      </tx:attributes>
    </tx:advice>

    <aop:config>

       <aop:pointcut expression="" id=""/>

       <aop:advisor advice-ref="" pointcut-ref=""/>

    </aop:config>

    涉及事务的指的是要调用transactionManager。

  • 相关阅读:
    list拖动
    android sdk
    AwwwB推荐网站全盘克隆
    WPF中的容器控件——WrapPanel
    WPF中的容器控件——StackPanel
    MFC应用程序中指针的使用
    排序算法之插入排序
    转:MFC 常用语句集锦
    【转】MFC学习总结
    排序算法之冒泡排序
  • 原文地址:https://www.cnblogs.com/01picker/p/4791320.html
Copyright © 2011-2022 走看看