Basic concepts of Spring

Source: Internet
Author: User

Overview of Spring


Spring is a lightweight control inversion (IoC) and facet-oriented (AOP) container framework, which is primarily designed to address the complexities of enterprise application development frameworks.

Function: Use basic JavaBean instead of EJB

Scope: Any Java application


Spring Core modules:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/86/wKioL1V_DFqQeIgEAAEhGJ2Tncg850.jpg "title=" Qq20150616012545.jpg "alt=" Wkiol1v_dfqqeigeaaehgj2tncg850.jpg "/>


The IOC of Spring

IOC: (Inversion of control, inversion control) is the core of spring, and throughout the so-called IOC, for the spring framework, spring is responsible for controlling the relationship between the object's life cycle and the objects:

    • Traditional development patterns: objects are interdependent (Figure 1)

    • IOC Development mode: IOC container to arrange dependencies between objects (Figure 2)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/8A/wKiom1V_DhmwyrgtAAFm1lGJ-SI796.jpg "title=" Qq20150616014019.jpg "alt=" Wkiom1v_dhmwyrgtaafm1lgj-si796.jpg "/>


Dependency Injection (DI)

Another name for the IOC is called Dependency Injection (Dependency injection), which is the dynamic injection of a dependency into an object by the IOC container during operation. Therefore, dependency injection and inversion control are the same thing that is described from different angles. is to introduce the IOC container and use the dependency injection method to realize the decoupling between object coupling.


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/86/wKioL1V_EqTAr7QPAAFw2a1Wai4342.jpg "title=" Qq20150616015232.jpg "alt=" Wkiol1v_eqtar7qpaafw2a1wai4342.jpg "/>



Spring's AOP


AOP is designed to deal with cross-concern problems distributed in various modules in a system, and in Java EE applications, it is common to use AOP to handle some system-level services with crosscutting properties, such as transaction management, security checks, caching, object pool management, and so on.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/8A/wKiom1V_E-zCF_oIAADNgVS4too808.jpg "title=" Qq20150616020503.jpg "alt=" Wkiom1v_e-zcf_oiaadngvs4too808.jpg "/>


An AOP proxy is actually an object that is dynamically generated by an AOP framework that can be used as a target object,

Methods that the AOP proxy contains methods and target objects:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/86/wKioL1V_Fl6hOrtgAADc4ndXrB4595.jpg "title=" Qq20150616020817.jpg "alt=" Wkiol1v_fl6hortgaadc4ndxrb4595.jpg "/>


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/8A/wKiom1V_Ff7B9m9AAAJKz18ads0541.jpg "title=" Qq20150616021359.jpg "alt=" Wkiom1v_ff7b9m9aaajkz18ads0541.jpg "/>






Geek College: http://www.jikexueyuan.com/course/665.html

Images from Course videos

Basic concepts of Spring

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.