Spring First Knowledge

Source: Internet
Author: User

Spring is an open source framework that is created to address the complexities of enterprise application development. The use of spring is not limited to server-side development. From the standpoint of simplicity, testability, and loose coupling, any Java application can benefit from spring.

Spring is a lightweight control inversion (IoC) and facet-oriented (AOP) container framework.

Spring is the Java EE application Framework, which is a lightweight container framework for IoC and AOP, and is primarily lightweight containers for managing the life cycle , can be used alone, can also be used in combination with Struts frame,ibatis frame, etc.

1)IOC (inversion of control) inversion, object creation responsibility reversal, beanfacotory in spring is the Core interface of the IOC container, Responsible for instantiating, locating, configuring objects in the application, and establishing dependencies between these objects. Xmlbeanfacotory implements the beanfactory interface, which consists of the Application object and the dependencies between objects by obtaining the XML configuration file data.

There are three kinds of injection methods in spring, one is set injection, one is interface injection, the other is construction method injection.

2)AOP- oriented tangent programming

AOP is vertical programming, as shown, business 1 and Business 2 need a common operation, and instead of adding the same code to each business, write the code again and let two businesses use the code together.

There are two ways to implement facets-oriented implementations in spring, one is dynamic proxy, one is CGLIB, thedynamic proxy must provide an interface, and the CGLIB implementation has inheritance.

: http://repo.spring.io/release/org/springframework/spring/

Spring First Knowledge

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.