NOTE
Spring IoC Source: Creating the Application Context
High-level ApplicationContext refresh flow from environment/bean definitions through post-processors and singleton initialization.
This is a historical learning note and may contain outdated or incomplete understanding.
Spring context creation culminates in a refresh-style lifecycle that prepares the context/bean factory, loads/uses bean definitions, invokes factory post-processors, registers bean post-processors, initializes infrastructure, and eventually creates non-lazy singletons.
The exact method list changes by Spring generation. Use the phases—not one historical stack trace—as the main model: prepare metadata → customize definitions/factory → install processors/infrastructure → instantiate beans → publish ready lifecycle.