What is difference between BeanFactory and ApplicationContext in Spring?

BeanFactory

Does not support the Annotation based dependency Injection.

ApplicationContext

Support Annotation based dependency [email protected], @PreDestroy


BeanFactory

Does not Support

ApplicationContext

Application contexts can publish events to beans that are registered as listeners


BeanFactory

Does not support way to access Message Bundle(internationalization (I18N)

ApplicationContext

Support internationalization (I18N) messages.


BeanFactory

Doesn’t support such JNDI access, EJB integration, remoting

ApplicationContext

Support many enterprise services such JNDI access, EJB integration, remoting.


BeanFactory

By default its support Lazy loading

ApplicationContext

its By default support Aggresive loading.


 

Leave a Reply