zoukankan      html  css  js  c++  java
  • Spring AOP 练习

    Joinpoint:它定义在哪里加入你的逻辑功能,对于Spring AOP,Jointpoint指的就是Method。
    Advice:特定的Jointpoint处运行的代码,对于Spring AOP 来讲,有Before advice、AfterreturningAdvice、ThrowAdvice、AroundAdvice(MethodInteceptor)等。
    Pointcut:一组Joinpoint,就是说一个Advice可能在多个地方织入,
    Aspect:实际是Advice和Pointcut的组合,但是Spring AOP 中的Advisor也是这样一个东西,但是Spring中为什么叫Advisor而不叫做Aspect。
    Target:被通知的对象。
    Proxy:将通知应用到目标对象后创建的对象
    Weaving:将Aspect加入到程序代码的过程,对于Spring AOP,由ProxyFactory或者ProxyFactoryBean负责织入动作。

    spring对AOP的支持有以下4种情况:
    经典的基于代理的aop(各版本spring)
    注入式自动代理切面(各版本spring)
    @AspectJ注解驱动的切面(spring2.0后)
    纯pojo切面(spring2.0后)

    代码Demo下载地址:https://files.cnblogs.com/onlywujun/SpringAopTest.zip

  • 相关阅读:
    SpringMVC拦截器
    SpringMVC异常
    SpringMVC文件上传
    SpringMVC返回值类型
    JVM字节码
    使用Apache JMeter进行测试
    Tomcat优化
    垃圾收集器
    GC常见算法
    VisualVM远程连接Tomcat
  • 原文地址:https://www.cnblogs.com/onlywujun/p/2946110.html
Copyright © 2011-2022 走看看