Spring Bean Life Cycle – Bean Initialization and Destruction

Spring IoC container is also responsible for managing the Spring Bean Life Cycle, the life cycle of beans consist of call back methods such as Post initialization call back method and Pre destruction call back method. Below steps are followed by Spring IoC Container to manage bean life cycle.

Spring Bean Life Cycle

  1. Creation of bean instance by a factory method.
  2. Set the values and bean references to the bean properties.
  3. Call the initialization call back method.
  4. Bean is ready for use.
  5. Call the destruction call back method.

[Read more…]