简称:
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