Spring Learning Notes (i)--spring basic concepts and Systems overview

Source: Internet
Author: User

About Spring

Spring provides a lightweight solution for enterprise-class development, which mainly includes

    • Based on the core function of dependency injection;
    • Declarative facet-oriented programming (AOP) support;
    • Integration with a variety of persistent layer technologies;
    • Stand-alone web MVC framework

In short, Spring is a lightweight IOC (inversion of Control) and AOP (face-oriented) container framework.

    • Control inversion: Spring facilitates loose coupling through a technique called inversion of control.

That is, other objects that an object relies on are passed in passively, rather than the object itself creating or locating dependent objects.

    • Aspect-oriented: allows for the development of cohesive systems and services by separating the business logic of the application.
    • Container: Spring contains and manages the configuration and declaration cycles of the Application object, in this sense spring is just a container where developers can configure each bean of their own

You can create a separate instance or generate a new instance each time you need it, and how to correlate the beans when you configure them.

Spring Architecture

The various modules of the spring framework are described below:

(1) Spring Core module

IOC functions are implemented, the dependencies between classes and classes are detached from the code, and the dependency descriptions are configured in such a way that the IOC container is responsible for the creation, splicing, management, and acquisition of the classes.

The Beanfactory interface is the core interface of the spring framework, which implements many of the core functions of the container.

The context module builds on the core module, expands the function of beanfactory, and adds many functions such as il8n internationalization, bean Lifecycle control, framework event System, resource loading transparency and so on.

The expression language is an extension of the Unified Expression language (Unified EL), which is used to query and manage the run-time objects.

(2) AOP module

In this module, spring provides implementations that meet the AOP Alliance specification and integrates the AOP language-level framework of ASPECTJ.

<java 5.0 introduces Java.lang.instrument, which allows a proxy class to be enabled at the start of the JVM, modifying the class's bytecode during runtime, changing the functionality of a class, and implementing the functions of AOP >

(3) Data access and integration modules

Spring at the abstract level of DAO, set up a set of anomaly system for DAO layer unification.

At the same time, the examination-type anomalies of various access data are converted to non-inspection anomalies, which provides the basis for consolidating various persistent layer frameworks.

Spring has built a unified DAO layer that is independent of data form and access technology, and with AOP technology, Spring provides declarative transaction functionality.

(4) Web and remote operation module

The module builds on the IQ of the application context module and provides a variety of tools for Web applications.

such as: The Spring container is initialized with a listener or servlet, and the spring container is registered in the Web container.

Second, the module also provides a number of web-oriented features, such as transparent file upload, Velocity, Freemarker, XSLT support.

(5) Web and Remote access framework

Spring itself provides a complete, strust-like MVC framework that becomes spring MVC.

and for each function module, the Spring Framework provides a separate jar file, which makes it easy for developers to selectively use the functionality provided by spring.

Spring Learning Notes (i)--spring basic concepts and Systems overview

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.