What are the various steps involved in a Spring beans life cycle?

What are the various steps involved in a Spring beans life cycle?

The bean factory performs several steps before a bean is ready is use:
  1.   Instantiate.
  2.   Populate properties.
  3.   The factory calls BeanNameAware\'s setBeanName() method.
  4.   The factory calls BeanFactoryAware\'s setBeanFactory() method.
  5.   PostProcessBeforeInitialization() method is called if BeanPostProcessor associated with the bean.
  6.   An init-method is called, if specified.
  7.   Finally, PostProcessAfterInitialization() is called if BeanPostProcessor associated with it.

By:Jalees
Date:2031-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher