Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

The IOC Container The org.springframework.beans and org.springframework.

.context packages provide t he basis for the Spring Framework's IoC container. The Bean Factory interface provides an advanced configuration mechanism capable of managing objects of any nature. The Application Context interface builds on top of the BeanFactory (it is a subinterface) and adds other functionality such as easier integration with Spring's AOP features, message resource handling (for use in internationalization), even t propagation, and application-layer specific contexts such as the WebApplicatio nContextfor use in web applications. In short, the BeanFactory provides the configuration framework and basic functio nality, while theApplicationContext adds more enterprise-centric functionality t o it. In Spring, those objects that form the backbone of your application and that are managed by the Spring IoC container are referred to as beans. A bean is simply an object that is instantiated, assembled and otherwise managed by a Spring IoC container; other than that, there is nothing special about a bean. The Container o The BeanFactory interface is the central IoC container interface in Spri ng. Its responsibilities include instantiating or sourcing application objects, configuring such objects, and assembling the dependencies between these objects. o There are a number of implementations of the BeanFactory interface that come supplied straight out-of-the-box with Spring. The most commonly usedBeanFac tory implementation is the XmlBeanFactory class. This implementation allows you to express the objects that compose your application, and the doubtless rich int erdependencies between such objects, in terms of XML. The XmlBeanFactory takes t his XML configuration metadata and uses it to create a fully configured system o r application.

You might also like