AOP xml configuration

applicationContext.xml

<-! Facets Bean ->

<bean id ="aspectbean" class='"con.softjx.intercept.MyInterceptior'>

 

<! - Configuration AOP ->

<aop:config>

  <Aop: aspect id = "asp" ref = "aspectbean" order = "1"> <-! Cut execution order ->

    <Aop: around pointcut-ref = "mycut" method = "doBasic" /> <-! Configure the notification section ->

    <Aop: before pointcut-ref = "mycut" method = "doBasic" /> <-! Configure the notification section ->

    <Aop: after pointcut-ref = "mycut" method = "doBasic" /> <-! Configure the notification section ->

  </aop:aspect>

</aop:config>

Guess you like

Origin www.cnblogs.com/gzhbk/p/11829705.html