spring ioc

// Allows post-processing of the bean factory in context subclasses.

                                     postProcessBeanFactory(beanFactory);

1.空实现     ioc容器

 

                                     // Invoke factory processors registered as beans in the context.

                                     invokeBeanFactoryPostProcessors(beanFactory);

2.实例化工厂bean,

                                     // Register bean processors that intercept bean creation.

                                     registerBeanPostProcessors(beanFactory);

3.注册容器

                                     // Initialize message source for this context.

                                     initMessageSource();

4.初始化信息资源

                                     // Initialize event multicaster for this context.

                                     initApplicationEventMulticaster();

5.初始化应用事件

                                     // Initialize other special beans in specific context subclasses.

                                     onRefresh();

6.

                                     // Check for listener beans and register them.

                                     registerListeners();

 

                                     // Instantiate all remaining (non-lazy-init) singletons.

                                     finishBeanFactoryInitialization(beanFactory);

 

                                     // Last step: publish corresponding event.

                                     finishRefresh();

posted @ 2018-05-10 18:02  爱吃醋的工程师  阅读(97)  评论(0编辑  收藏  举报