Spring source Analysis (a)--overall architecture and environment construction

Source: Internet
Author: User

The spring source version of this system analysis is 4.3.8.

(a) Overall structure

These modules are divided into the following sections

(1) Core Container

The core container (the kernel container) contains the Core,beans,context and expression language modules.

    • Core modules (Spring-core) mainly contain the basic core tool classes of the spring framework, and the other components of spring use the classes in this package, and the core modules are the basic cores of other components. It's like a prop to use when acting.
    • The Beans Module (spring-beans) is all that is applied to the bean class to be used. It contains access to configuration files (such as Spring-mvc.xml), creation and management of beans, and all classes related to inversion of control/dependency injection (IOC/DI) operations. Like actors in acting.
    • The context module (Spring-context) is built on top of the core and beans modules and provides a framework-based approach to object access similar to the Jndi registrar. The context module inherits the features of the beans and provides a number of extensions to the spring core, adding support for internationalization, event propagation, resource loading, and transparent creation of the context. The ApplicationContext interface is the key to the context module. Like a scene in the act.
    • Expression Language Module (spring-expression) provides a powerful expression language for run-time querying and manipulating objects. The language supports setting/getting property values, assigning attributes, invoking methods, accessing array contexts, containers and indexers, logical and arithmetic operators, naming variables, and retrieving objects from the spring IOC container by name. It also supports the list projection. Select and General List aggregation.

(2) Data access/integration

    • The JDBC module provides a JDBC abstraction layer that eliminates the lengthy JDBC encoding and parsing of database vendor-specific error codes, which contain all of the classes that spring encapsulates for JDBC data access
    • The ORM module provides an interaction layer for popular object-relational mapping APIs, such as JPA, JDO, Hibernate, Ibatis, and so on, using an ORM wrapper package that can mix all spring-provided features for O/R mapping, such as the simple declarative transaction management mentioned earlier
    • The Transaction module supports programmatic and declarative management of things, which must implement specific interfaces and apply to all Pojo.

(3) Web

The Web context module builds on the application context module and provides context for Web-based applications, so the spring framework supports integration with Jakarta struts. The Web module also simplifies the process of working with multipart requests and binding request parameters to domain objects. The Web layer contains the Web, Web-servlet, web-struts, and Web-porlet modules

    • Web modules: Provides basic web-oriented integration features such as multi-file uploads, using servlet listeners to initialize IOC containers, and a web-oriented application context, which also contains the relevant parts of the web in spring remote support
    • Web-servlet module Web.servlet.jar: This module contains the Spring Model-view-controller (MVC) implementation, and the Spring MVC Framework enables model-wide code and web Forms can be clearly separated from each other and are based on other features of the spring framework
    • Web-struts Module: This module provides support for struts, enabling classes to be integrated with a typical struts web layer in spring applications
    • Web-porlet module: Provides an MVC implementation for the Portlet environment and the Web-servlet module

(4) AOP

The AOP module provides a facet-oriented implementation that conforms to the AOP Federation standard, allowing you to define, for example, method interceptors and pointcuts, to separate logical code from the coupling between them. With the Source-level metadata feature, you can also incorporate various behavioral information into your code

The spring AOP module provides transaction management services for objects in spring-based applications by using spring AOP to integrate declarative transaction management into applications without relying on EJB components

    • The aspects module provides integrated support for the ASPECTJ.
    • The instrumentation module provides class instrumentation support and ClassLoader implementations that can be used on specific application servers.

(5) Test

The test module supports testing of spring components using JUnit and testng.

(ii) Environmental construction

(1) from the official website https://projects.spring.io/spring-framework/Click on the image of the kitten, go to GitHub to download the corresponding version of the spring source code.

(2) Check whether the Java environment is installed, execute the Import-into-eclipse.bat file under the source directory to convert to Eclise project.

(3) Import idea

(4) Different situations will appear different problems, this import normal. If there are some exceptions, search for a workaround.

Spring source Analysis (a)--overall architecture and environment construction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.