employer cover photo
employer logo
employer logo

Tata Consultancy Services

Part of Tata Group

Engaged Employer

Tata Consultancy Services Interview Question

Difference between application Context and Bean Factory

Interview Answer

Anonymous

Mar 17, 2020

Both BeanFactory and ApplicationContext provides a way to get a bean from Spring IOC container by calling getBean("bean name") One difference between bean factory and application context is that former only instantiate bean when you call getBean() method while ApplicationContext instantiates Singleton bean when the container is started, It doesn't wait for getBean to be called