1. Usagehistorical

    1. Create the project 2. pom.xml 3. Code

  2. What Spring AOP Ishistorical

    1. What AOP is 2. Implementation principle

  3. 1. Inject AspectJAnnotationAutoProxyCreator into the Containerhistorical

    Enable AOP, register AspectJAnnotationAutoProxyCreator, and trace when ImportBeanDefinitionRegistrar.registerBeanDefinitions is called

  4. 2.1 How the AnnotationAwareAspectJAutoProxyCreator Bean Instance Is Createdhistorical

    Class hierarchy, call-stack analysis, BeanFactoryAware setBeanFactory, registration and initialization of AnnotationAwareAspectJAutoProxyCreator

  5. Spring AOP Source Analysis Summaryhistorical

    Created on Monday, July 22, 2019. Source analysis of Spring AOP from @EnableAspectJAutoProxy through auto-proxy creation and target-method interceptor execution.

  6. 2.2 When Does AnnotationAwareAspectJAutoProxyCreator Take Effect?historical

    Trace postProcessBeforeInstantiation and postProcessAfterInitialization while creating singleton Beans

  7. 2.3 How AnnotationAwareAspectJAutoProxyCreator Creates Proxy Objectshistorical

    Trace to postProcessBeforeInstantiation, determine whether a proxy is needed, wrap the Bean with advisors, and create JDK/CGLIB proxies

  8. 2.4 How the Target Method Is Executedhistorical

    Invoke Calc.div, enter the proxy intercept method, build the interceptor chain, and execute interceptors plus the target method