Spring Framework provides Spring Factory Method mechanics to create Beans from static(non-static) method of a Factory Class in XML config files. In the tutorial, JavaSampleApproach will introduce Spring Factory Method with sample codes.
The BeanPostProcessor interface helps us provide our own methods before the initialization of beans and likewise after the initialization of the bean.
BeanPostProcessor are common for all beans in the container where it is defined, so it is different from @PostConstruct, InitializingBean and custom init method which are defined on the bean itself.
Related Article: Spring Bean Life Cycle
Spring Bean Life Cycle is very important because in many applications, we want to create some operations before initializing a Bean or make some operations before bean’s destruction.
This tutorial introduce four ways to control life cycle events of a Bean.
Spring Bean Scopes helps you control the scope of the objects which are created from bean definition. This approach is wonderful because you can choose the scope by configuring bean instead of working at Java class level.
The Spring Framework supports 7 scopes, but this tutorial introduces you 2 of them: singleton scope and prototype scope. The others will be discussed in next article.
Bean Definition Inheritance is a good solution for defining new bean which inherited certain bean conveniently.
We will learn how to use XML configuration to create Inheritance from Bean with parent or abstract template.