// 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();