Wednesday, 20 April 2016

What does Spring IoC container contains ?


The org.springframework.beans and org.springframework.context packages provide the basis for the Spring Framework's IoC container.

The BeanFactory interface provides an advanced configuration mechanism capable of managing objects of any nature.

The ApplicationContext interface builds on top of the BeanFactory (it is a sub-interface) and adds other functionality such as :
  • easier integration with Spring's AOP features
  • message resource handling (for use in internationalization)
  • event propagation, and
  • application-layer specific contexts such as the WebApplicationContext for use in web applications

In short, the BeanFactory provides the configuration framework and basic functionality, while the ApplicationContext adds more enterprise-centric functionality to it.

The ApplicationContext is a complete superset of the BeanFactory.

The org.springframework.beans.factory.BeanFactory is the actual representation of the Spring IoC container that is responsible for containing and otherwise managing the beans.

The BeanFactory interface is the central IoC container interface in Spring.
Its responsibilities include instantiating or sourcing application objects, configuring such objects, and assembling the dependencies between these objects.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.