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

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.
主站蜘蛛池模板: 拜泉县| 桂阳县| 承德市| 博客| 达州市| 华容县| 康保县| 黄冈市| 古蔺县| 东丽区| 塔河县| 米易县| 琼海市| 河津市| 沁源县| 乐安县| 咸丰县| 南部县| 井冈山市| 灵川县| 青川县| 金华市| 敦化市| 沙坪坝区| 石阡县| 聂荣县| 富宁县| 柳江县| 梁山县| 龙陵县| 长沙县| 射阳县| 北川| 南宫市| 棋牌| 龙门县| 苏尼特右旗| 康平县| 三穗县| 盐池县| 阜南县|