- Building Microservices with Spring
- Dinesh Rajput Rajesh R V
- 118字
- 2021-07-02 14:53:58
Bean factory
In the Spring Framework, the org.springframework.beans.factory.BeanFactory interface provides the bean factory, which is a Spring IoC container. XmlBeanFactory is an implementation class for this interface. This container reads the configuration metadata from an XML file. It is based on the GOF factory method design pattern--it creates, manages, caches, and wires the application objects in a sophisticated manner. The bean factory is merely an object pool where objects are created and managed by configuration. For small applications, this is sufficient, but enterprise applications demand more, so spring provides another version of the spring container with more features.
In the next section, we will learn about the application context and how Spring creates it in the application.