Difference between BeanFactory and ApplicatonContext is:-
Difference between BeanFactory and ApplicationContext are following:
- BeanFactory uses lazy initialization but ApplicationContext uses eager initialization. In case of BeanFactory, bean is created when you call getBeans() method, but bean is created upfront in case of ApplicationContext when the ApplicationContext object is created.
- BeanFactory doesnt support internatiolization but ApplicationContext supports internationalization.
- With BeanFactory annotation based dependency injection is not supported but annotation based dependency injection is supported in ApplicationContext.
- BeanFactory explicitly provide a resource object using syntax but ApplicationContext creates and manages resource objects on its own.