#bean-lifecycle
Posts
-
Digging into Spring's Source 6: Lifecycle Callbacks and PostProcessors — Where You Can Step into the Container
When exactly, and in what order, are BeanFactoryPostProcessor, BeanPostProcessor and its sub-interfaces, the Aware interfaces, @PostConstruct, InitializingBean, init-method, @PreDestroy, DisposableBean, destroy-method, SmartInitializingSingleton and SmartLifecycle called? Checked against the real source and real program output, with a look at why there are so many different hooks.
-
Digging into Spring's Source 4: How a Bean Gets Created — the Creation Flow and the Three-Level Cache
What happens inside Spring when getBean() is called once, followed step by step for someone new to Spring. The cache lookup, the three creation steps (instantiate, inject, initialise), and how three maps untangle a circular reference where A needs B and B needs A — all checked against the real source.