官术网_书友最值得收藏!

Core container

The core container is the basis of the whole Spring ecosystem and comprehends four components—core, beans, context, and expression language.

Core and beans are responsible for providing the fundamentals of the framework and dependency injection. These modules are responsible for managing the IoC container, and the principal functions are the instantiation, configuration, and destruction of the object residents in the Spring container.

Spring contexts are also called Spring IoC containers, which are responsible for instantiating, configuring, and assembling beans by reading configuration metadata from XML, Java annotations, and/or Java code in the configuration files.

There are two critical interfaces inside these modules—BeanFactory and ApplicationContext. The BeanFactory takes care of the bean lifecycle, instantiating, configuring, managing, and destroying, and the ApplicationContext helps developers to work with files resources in a generic way, enable to publish events to registered listeners. Also, the ApplicationContext supports internationalization and has the ability to work with messages in different Locales.  

These modules help the context component to provide a way to access the objects inside the container. The context component has the ApplicationContext interface with the essential class for the container.

Some common annotations are  @Service, @Component, @Bean, and  @Configuration.
主站蜘蛛池模板: 沙河市| 蒲江县| 呼伦贝尔市| 克什克腾旗| 资溪县| 蓬溪县| 工布江达县| 衡南县| 崇左市| 丹江口市| 长乐市| 叶城县| 化隆| 鱼台县| 清河县| 衡山县| 龙里县| 金山区| 海口市| 福贡县| 财经| 固始县| 吉隆县| 兰考县| 沧源| 固阳县| 龙岩市| 英德市| 临沂市| 衡阳市| 巢湖市| 甘南县| 徐州市| 澎湖县| 香港| 闽侯县| 霍山县| 河南省| 丁青县| 昆明市| 宁强县|