1. Which of the following is not a valid Spring bean scope?

Answers

1. singleton

2. prototype

3. session

4. global

2. In the Spring Bean life cycle, which method is called after dependency injection is done?

Answers

1. destroy()

2. afterPropertiesSet()

3. init()

4. setBeanName()

3. Which interface should a bean implement to get notified of its initialization?

Answers

1. InitializingBean

2. BeanFactoryAware

3. BeanPostProcessor

4. ApplicationContextAware

4. What is the main difference between auto-wiring and explicit wiring in Spring?

Answers