Answers

Question and Answer:

  Home  Spring Framework

⟩ What is the difference between Bean Factory and Application Context?

On the surface, an application context is same as a bean factory. But application context offers much more..

► Application contexts provide a means for resolving text messages, including support for i18n of those messages.

► Application contexts provide a generic way to load file resources, such as images.

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

► Certain operations on the container or beans in the container, which have to be handled in a programmatic fashion with a bean factory, can be handled declaratively in an application context.

► ResourceLoader support: Spring’s Resource interface us a flexible generic abstraction for handling low-level resources. An application context itself is a ResourceLoader, Hence provides an application with access to deployment-specific Resource instances.

► MessageSource support: The application context implements MessageSource, an interface used to obtain localized messages, with the actual implementation being pluggable

 161 views

More Questions for you: