zoukankan      html  css  js  c++  java
  • Spring 配置文件AOP

     1 <!-- 配置切面bean -->
     2         <bean id="permAspect" class="com.tx.spring.aspect.PermAspect"></bean>
     3         
     4         <bean id="userService" class="com.tx.spring.service.impl.UserServiceImpl"></bean>
     5         
     6         <aop:config>
     7             <!-- 配置切点 -->
     8             <aop:pointcut expression="execution(* com.tx.spring.service..*.*(..))" id="mycut"/>
     9             <!-- 配置切面 -->
    10             <aop:aspect ref="permAspect">
    11                 <aop:before method="preAspect" pointcut-ref="mycut"/>
    12                 <aop:after method="afterAspect" pointcut-ref="mycut"/>
    13                 <!-- 返回通知 -->
    14                 <aop:after-returning method="returnAdvice" pointcut-ref="mycut" returning="returnval"/>
    15                 <!-- 环绕通知 -->
    16                 <aop:around method="aroundAdvice" pointcut-ref="mycut" />
    17             </aop:aspect>
    18         </aop:config>
  • 相关阅读:
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    iOS开发系列--IOS程序开发概览
    iOS开发系列—Objective-C之Foundation框架
  • 原文地址:https://www.cnblogs.com/cat-fish6/p/8705755.html
Copyright © 2011-2022 走看看