Spring Aop 原理分析

@EnableAspectJAutoProxy Aop功能开启注解

  为容器中导入 @Import(AspectJAutoProxyRegistrar.class)组件,在其重写方法中注册 AnnotationAwareAspectJAutoProxyCreator (Aspectj自动代理生成器)

        明名为 "org.springframework.aop.config.internalAutoProxyCreator";(起名)

  AnnotationAwareAspectJAutoProxyCreator

    ->AspectJAwareAdvisorAutoProxyCreator

      ->AbstractAdvisorAutoProxyCreator

        ->AbstractAutoProxyCreator   implements SmartInstantiationAwareBeanPostProcessor, BeanFactoryAware(后置处理器 ,在bean,beanfactory初始化完成后做事情)

  

猜你喜欢

转载自www.cnblogs.com/leaveast/p/10829917.html