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

  • Spring 5.0 By Example
  • Claudio Eduardo de Oliveira
  • 204字
  • 2021-06-24 19:17:25

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.
主站蜘蛛池模板: 永昌县| 苏尼特左旗| 武胜县| 嘉禾县| 繁峙县| 开封市| 南江县| 吐鲁番市| 鸡东县| 平江县| 错那县| 河西区| 邳州市| 富锦市| 高碑店市| 北辰区| 同仁县| 屯昌县| 广汉市| 镇安县| 儋州市| 漳浦县| 新邵县| 温州市| 青铜峡市| 富裕县| 日喀则市| 龙口市| 博客| 营山县| 乾安县| 奉节县| 永新县| 渭南市| 密山市| 屏山县| 和平区| 蒙城县| 祥云县| 基隆市| 湖南省|