The beans in the spring container have a distinct life cycle consisting of several specific life stages, each of which allows the outside to exert control over the bean. In spring, we describe the bean's life cycle from the scope of the bean and the series of stages it undergoes to instantiate the bean:
The life cycle of the bean in Beanfactory
Simple can be divided into three categories
1.The Bean's Own method (invoking the Bean's constructor to instantiate the bean, invoking the setter method to set the Bean's property value, and the Init-method and Destory-method methods of the bean through the configuration file)
2.Bean life Cycle Interface Methods (Beannameaware,beanfactoryaware,initializaingbean and Disposablebean)
3. container and life cycle structure method (green box section)
The life cycle of the bean in ApplicationContext
The life cycle interpretation of Bean in spring