Pergunta de entrevista da empresa Tata Consultancy Services

Difference between application Context and Bean Factory

Resposta da entrevista

Sigiloso

17 de mar. de 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