- The main interface relationship is involved, and the specific IOC container is implemented under this interface system , such as defaultlistablebeanfactory, The implementation of this basic IOC container is to implement the configurablebeanfactory, thus becoming a simple IOC container implementation. Like other IOC containers, such as xmlbeanfactory, are extensions made on the basis of defaultlistablebeanfactory, as well as ApplicationContext implementations.
- This interface system is based onbeanfactoryAndApplicationContextAs the core. And Beanfactory is the most basic interface of the IOC container, in the design of ApplicationContext,On one hand, you can see that it inherits from the Beanfactory interface system.listablebeanfactory、Autowirecapablebeanfactroy、hierarchicalbeanfactoryBeanfactory interface, with the basic functions of beanfactory IOC container;On the other, by inheritingMessagesource、Resourceloadr、ApplicationeventpublisherThese interfaces, beanfactory for ApplicationContext, give themore advanced IOC container features。 For ApplicationContext, in order touse in a Web environmentIt also designed theWebapplicationcontextinterface, and this interface is inherited by theThemesourceinterface toexpansion Function。
Design of Spring IOC container--Secondary line