首页 > 编程语言 > 详细

Spring的源码解析

时间:2020-03-21 15:22:24      阅读:43      评论:0      收藏:0      [点我收藏+]

简称:

ACAC->AnnotationConfigApplicationContext

ENV->StandardEnvironment

DLBF->DefaultListableBeanFactory

一、重要的类

  1、AnnotationConfigApplicationContext

      1.1 reader=new AnnotatedBeanDefinitionReader(ACAC);

          1.1.1 registry=ACAC

          1.1.2 conditionEvaluator=new ConditionEvaluator(ACAC, ENV, null);

              1.1.2.1 context=new ConditionContextImpl(ACAC, ENV, null);
                1.1.2.1.1 registry=ACAC
                1.1.2.1.2 beanFactory=DLBF
                1.1.2.1.3 environment=ENV
                1.1.2.1.4 resourceLoader=ACAC
                1.1.2.1.5 classLoader=AppClassLoader

          1.1.3 注册BeanDefination

            org.springframework.context.annotation.internalConfigurationAnnotationProcessor=ConfigurationClassPostProcessor.class

            org.springframework.context.annotation.internalAutowiredAnnotationProcessor=AutowiredAnnotationBeanPostProcessor.class

            org.springframework.context.annotation.internalCommonAnnotationProcessor=CommonAnnotationBeanPostProcessor.class

            org.springframework.context.event.internalEventListenerProcessor=EventListenerMethodProcessor.class

            org.springframework.context.event.internalEventListenerFactory=DefaultEventListenerFactory.class

      1.2 scanner

      1.3 beanFactory=new DefaultListableBeanFactory();

      1.4 environment=new StandardEnvironment();

  2、DefaultListableBeanFactory

      2.1 dependencyComparator=new AnnotationAwareOrderComparator();

      2.2 autowireCandidateResolver=new ContextAnnotationAutowireCandidateResolver();

      2.3 beanDefinitionMap

      2.4 beanDefinitionNames

Spring的源码解析

原文:https://www.cnblogs.com/erdanyang/p/12539397.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!