zoukankan      html  css  js  c++  java
  • day34_Spring学习回顾_02

    1、 AOP:切面编程
        切面:是 切入点 和 通知 结合。
        
    2、 spring aop 编程
        <aop:config>
        方法1:
            <aop:pointcut expression="切入点表达式" id=""/>
            <aop:advisor advice-ref="通知的引用" pointcut-ref="切入点的引用"/>  特殊的切入点
    
        方法2:
            <aop:advisor advice-ref="通知的引用" pointcut="切入点表达式"/>  公共的切入点
    
    3、 AspectJ xml
        <aop:config>
          <aop:aspect ref="切面类全限定名">
             <aop:pointcut>
             <aop:before>    前置通知
             <aop:afterReturning  returning="第二个参数的名称">    后置通知
             <aop:around>    环绕通知
             <aop:afterThrowing throwing="第二个参数的名称">    抛出异常通知
             <aop:after>    最终通知
    
    4、 AspectJ annotation 
        @Aspect
        @Pointcut("表达式")  private void xxx() {...}
        @Before 
        @...
    
    5、 切入点表达式
        <aop:pointcut expression="execution(* com.itheima.crm.*.service..*.*(..))" id=""/>
  • 相关阅读:
    Jquery+ajax+bootstrap
    Js+Jquery
    css(2)+JS
    css
    mysql 高级
    Git
    Redis
    Nginx
    python爬虫 | 一条高效的学习路径
    拉勾网爬取全国python职位并数据分析薪资,工作经验,学历等信息
  • 原文地址:https://www.cnblogs.com/chenmingjun/p/9415638.html
Copyright © 2011-2022 走看看