Spring Framework 면접 질문과 답변
Question: Explain Bean lifecycle in Spring framework?Answer: 1. The spring container finds the bean�s definition from the XML file and instantiates the bean.2. Using the dependency injection, spring populates all of the properties as specified in the bean definition. 3. If the bean implements the BeanNameAware interface, the factory calls setBeanName() passing the bean�s ID. 4. If the bean implements the BeanFactoryAware interface, the factory calls setBeanFactory(), passing an instance of itself. 5. If there are any BeanPostProcessors associated with the bean, their post- ProcessBeforeInitialization() methods will be called. 6. If an init-method is specified for the bean, it will be called. 7. Finally, if there are any BeanPostProcessors associated with the bean, their postProcessAfterInitialization() methods will be called. |
복습용 저장
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
도움이 되었나요? 예 아니요
Most helpful rated by users:
- What is Spring?
- What are the advantages of Spring framework?
- What are features of Spring?
- What are the types of Dependency Injection Spring supports?
- Please describe the basic modules of Spring Framework.