Bean
Java · 5 notes
- Bean Scopeshistorical
Singleton scope returns the same bean from the container, while prototype scope creates a new instance each time. These notes examine scope behavior.
- Bean Lifecyclehistorical
A Spring bean is instantiated and then undergoes property injection and further processing. These notes organize its lifecycle stages and extension points.
- BeanFactoryhistorical
BeanFactory instantiates, configures, and manages beans, while ApplicationContext adds further capabilities. These notes examine relationships among container interfaces.
- Circular Dependencieshistorical
Circular Dependencies: Suppose there are two Beans, Bean1 and Bean2. If Bean1 depends on Bean2, and Bean2 depends on Bean1, then when Spring creates Bean1 it first needs to create Bean2, while creating Bean2 requires creating Bean1 first.
- How to Load Beans A and B in Order in Springhistorical
Controller and Service examples examine loading relationships between Spring beans and ways to control their initialization order.