Core containers

This section consists of Core, Beans, Context, and Expression Language modules.

The Core module is the center of the Spring architecture. This provides the implementation for features such as Inversion of Control (IoC) and  Dependency Injection (DI). IoC is one of the center containers of the Spring core. DI is another known name of IoC. This container is responsible for creating forms of objects and controls the complete life cycle. During this life cycle, the system creates a dependency and the container injects those dependencies while it creates the bean. This inverse process of DI is basically called IoC.

org.springframework.beans and org.springframework.context are the two containers of Spring Framework's IoC. IoC has a root interface, called BeanFactory, which is executed by the items and holds various bean definitions, each bean being recognized by a String name. A propelled configuration component is given by this interface to deal with items. ApplicationContext is a sub-interface of BeanFactory, which includes more application-layer settings. For example, it includes WebApplicationContext for use in web applications. ApplicationContext is in charge of instantiating, designing, and collecting the beans.

The tasks of object instantiation, configuration, and object assembling are specified for the container in the configuration metadata. There are three ways to configure the metadata: through XML, annotation, or code. This occurs in spite of the way that we work with Kotlin, so we'll write code and metadata in the Kotlin language.

Here's a simple diagram of the flow of the Core container:

The core container is the process of getting the Spring project ready to see the output. With the help of Java POJO Classes, which are mainly the business objects and the Metadata (the configuration metadata), the Spring Container represents the ready application as output.

The Bean module represents a bean, which is an object that's assembled, managed, and instantiated by the IoC Container.

The Context module supports EJB, JMS, Basic Remoting, and so on. The ApplicationContext interface is the point of concurrence of the Context module.

The Expression Language module is normally used to execute logic, such as data query, sum, divide, and mod, in the application. To execute the logic, this module provides powerful expressions, as listed here:

Arithmetic +, -, *, /, %, ^
Relational <=, >=,<, >, ==, !=
Logical &&, ||, !
Conditional ?, :
Regex matches
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.30.178