AOP xml 配置

applicationContext.xml

<!--切面Bean-->

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

<!--配置AOP-->

<aop:config>

  <aop:aspect id="asp" ref="aspectbean" order="1"><!--切面执行顺序-->

    <aop:around pointcut-ref="mycut" method="doBasic"/><!--切面配置通知-->

    <aop:before pointcut-ref="mycut" method="doBasic"/><!--切面配置通知-->

    <aop:after pointcut-ref="mycut" method="doBasic"/><!--切面配置通知-->

  </aop:aspect>

</aop:config>

猜你喜欢

转载自www.cnblogs.com/gzhbk/p/11829705.html
今日推荐