Java Spring Framework Question:
Download Job Interview Questions and Answers PDF
What is the difference between Bean Factory and Application Context?
Answer:
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
► 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
Download Spring Framework Interview Questions And Answers
PDF
Previous Question | Next Question |
What is Application Context? | How is a typical spring implementation look like? |