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>
  • 相关阅读:
    3-2
    3-1
    2-11
    2-10
    2-7
    2-9
    springboot 使用undertow代替tomcat容器提高吞吐量
    springboot—JVM性能参数调优
    springbootDay3
    springboot_Mybaits_PageHelper
  • 原文地址:https://www.cnblogs.com/cat-fish6/p/8705755.html
Copyright © 2011-2022 走看看