开发者社区 开发与运维 文章 正文 2023-12-05 3 简介: Spring中refresh分析之finishBeanFactoryInitialization方法详解 我们分析过registerListeners后,本文分析finishBeanFactoryInitialization方法。 该方法其将会拿到所有的beanDefinitionNames,遍历beanNames,其非抽象、是单例、未配置lazy_init属性或其值非true那么就会触发getBean的操作。最后会对其中是SmartInitializingSingleton 类型的触发其afterSingletonsInstantiated方法。 AbstractApplicationContext的finishBeanFactoryInitialization方法 可以看到其对beanFactory做了一点配置后直接触发了preInstantiateSingletons方法。 DefaultListableBeanFactory的preInstantiateSingletons方法 方法流程梳理如下:...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with boolean isEager
Contact boolean isEager, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack