This is the 14th day of my participation in the August Text Challenge.More challenges in August

The Spring framework is arguably one of the most popular application development frameworks used by Java developers.

It currently consists of a large number of modules that provide a range of services. Includes module containers, section-oriented programming (AOP) to support building crosscutting concerns, security frameworks, data access frameworks, Web application frameworks, and classes to support module testing.

All components of the Spring framework are glued together through dependency injection. Dependency injection (also known as inversion of control) makes it easier to design and test loosely coupled software modules.

The Spring framework has matured over the years. Almost all the basic components needed for Java enterprise applications can be found in the Spring framework.

So, today I’m going to start a series of articles about the Spring framework and make it easy to get started with Spring in plain English.

The Spring framework

Spring is a lightweight Java development framework created in 2003 to address the complexities of enterprise application development. At the heart of Spring are inversion of Control (IoC) and section-oriented programming (AOP). Simply put, Spring is a layered Java SE/EE lightweight open source framework.

Spring’s main role is to “decouple” code, reducing the coupling between codes. The idea is to let the relationships between objects (modules and modules) be specified not using code associations, but through configuration. That is, the relationship of objects (modules) is explained in Spring.

Spring uses Ioc to decouple business objects based on the functional characteristics of the code. IoC removes the need for the main business to maintain its own relationship in the process of calling each other, that is, to create objects to use. Instead, it is managed by the Spring container and automatically “inject,” which means assign. AOP maximizes the reuse of system-level services, which are no longer manually “mixed” into the main business logic by programmers, but “woven” into it by the Spring container.

Liverpoolfc.tv: spring. IO /

Spring resources to download:

Contents of the LIBS directory:

Schema directory:

Advantages of the Spring framework

Spring is a framework, a half-finished piece of software. It consists of 20 modules. It’s a container-managed object, containers are things, Spring containers don’t hold text, numbers. It’s an object. Spring is a container for storing objects.

lightweight

The Jars used by the Spring framework are small, typically under 1M or a few hundred KILobytes. The total number of jars required for Spring core functionality is around 3M.

The Spring framework consumes fewer resources and runs efficiently. Do not rely on other jars

For interface programming, decouple

Spring provides Ioc inversion of control, container-managed objects, and object dependencies. The way objects were created in program code is now done by containers. Dependency decoupling between objects.

Support for AOP programming

The AOP functionality provided by Spring makes it easy to do section-oriented programming, and many functions that are not easy to implement with traditional OOP can be easily handled with AOP.

In Spring, developers can be freed from the complex transaction management code and manage transactions flexibly in a declarative way, improving development efficiency and quality.

Easy integration of various excellent frameworks

Spring does not exclude a variety of good open source frameworks. Instead, Spring makes them easier to use. Spring provides direct support for a variety of good frameworks such as Struts,Hibernate, MyBatis, etc. Simplify the use of frameworks.

Spring is like a plug board, and other frameworks are plugs that can be easily put together. Whichever frame you want to use, put this plug in the plugboard. It doesn’t need to be easily removed.

noninvasive

Non-intrusive means that the API of the Spring framework does not appear in the business logic. Since there is no Spring API in the business logic, the business logic can be quickly ported from the Spring framework to other frameworks, i.e. independent of the environment.

The container

Spring, as a container, manages the life cycle of objects and the dependencies between objects. Configuration files are used to define objects and set dependencies with other objects.

Spring Architecture

Spring consists of more than 20 modules, They can be divided into Data Access/Integration, Web, aspect oriented programming (AOP, Aspects, Application server appliance Management, Messaging, Core Container, and Test.

Spring Framework Download

Spring’s official website:spring.io

Download address:

Click on the link and search for the keyword “zip”.

Select the download version

Download version 4.3.9

The Spring4 framework decompresses the directory and Jar package description

Libs directory description: