Overview of Spring

Introduction of the Spring

Spring is a hierarchical full-stack lightweight open source framework, based on IoC and AOP as the kernel, provides a large number of enterprise application technologies such as presentation layer SpringMVC and business layer transaction management, but also can integrate many well-known third-party frameworks and class libraries in the open source world. It has become the most used Open source framework for Java EE enterprise applications.

 

When we often say Spring, we actually mean the Spring Framework.

The main content of this article will have an overview of Spring (basic situation), the core ideas of IoC and AOP, handwritten implementation of IoC and AOP (custom Spring framework), Spring IoC advanced applications, Spring IoC source in-depth analysis, Spring AOP advanced applications, Spring AOP source in-depth analysis and so on.

All the content of the article is organized into a PDF document, need this spring advanced source note document can pay attention to xiaobian + forward the article pay attention to the end of the article public account to obtain information.

 

The core structure of Spring

Spring is a lightweight framework with very clear layers and dependencies and responsibilities. It consists of several large modules: Spring relies on the data processing module, The Web module, the AOP (Aspect Oriented Programming /Aspects) module, the Core Container module, and the Test module, as shown below. Implements a lightweight framework that happily integrates existing solutions with zero intrusion.

 

  • The Core Container is the Core part of the Spring framework. It manages the creation, configuration, and management of beans in Spring applications. In this module, the Spring Bean factory is included, which provides DI functionality for Spring. Based on the bean factory, we will also find multiple implementations of Spring application contexts. All Spring modules are built on top of the core container.
  • Aspect Oriented Programming (AOP) /Aspects Spring provides rich support for aspect oriented programming. This module is the foundation of the development aspect in Spring applications, and like DI, AOP helps decouple application objects.
  • Data Access/Integration

Spring’s JDBC and DAO modules encapsulate a lot of boilerplate code to keep our database code clean and focused on our business, and to avoid problems caused by database resource release failures. In addition, Spring AOP provides transaction management services for data access, while Spring also integrates ORM, such as Hibernate, MyBatis and so on. This module consists of JDBC, Transactions, ORM, OXM and JMS modules.

  • Web This module provides the SpringMVC framework for Web applications and provides a variety of remote invocation schemes for building interactions with other applications. The SpringMVC framework improves the level of loose coupling of applications at the Web layer.
  • Test To make it easy for developers to Test, Spring provides a Test module dedicated to testing Spring applications. Through this module, Spring provides a series of mock object implementations for writing unit tests using servlets, JNDI, and so on.

Second, core ideas

IoC: What is IoC?

Note that this is a technical idea, not a technical implementation

Things described: Java development domain object creation, management issues

Traditional development methods: for example, class A depends on class B, and usually new an object of B in class A

 

AOP: What is AOP

AOP: Aspect Oriented Programming

AOP is a continuation of OOP, starting with OOP

 

Third, handwritten implementation of IoC and AOP

This section, I will have a [bank transfer] actual case, not in the article to show you all, need to pay attention to the whole article PDF small series + forward article pay attention to the end of the public account to obtain.

In the previous section, we understood the IoC and AOP ideas. Leaving aside how Spring implements these two ideas, we prepared a “bank transfer” case. What are the problems with this case at the code level? Analyze and then use our existing knowledge to solve these problems (pain points). In this process, we are analyzing step by step and implementing IoC and AOP by hand.

Directory:

  1. Bank transfer case interface
  2. Bank transfer case table structure
  3. Bank transfer case code call relationship
  4. Bank transfer case key code
  5. Bank transfer case code analysis
  6. Problem Solution
  7. Case code modification

 

 

Fourth, Spring IOC application

Section 1 Spring IoC Basics

 

Section 2. Advanced Spring IOC features

 

Five, Spring IOC source in-depth analysis

 

 

Six, Spring AOP application

 

Seven, Spring AOP source depth analysis

 

 

Conclusion:

Spring is often used in many large factories, up to understand the underlying principle of Spring, as well as peruse the source code is very key, the above list to everyone is just the overview of Spring (basic situation), the core idea of IoC and AOP, handwritten implementation of IoC and AOP (custom Spring framework), Spring IoC advanced application, Spring IoC source in-depth analysis, Spring AOP advanced application, Spring AOP source in-depth analysis of these details, which are part of the need for the whole document friends can pay attention to small series + forward article focus on the following public number to obtain. (More thousands of big factory interview questions sent)

Thousand way big factory interview real question