Spring Learning Notes

Source: Internet
Author: User
Tags aop

Description of the 1.Spring framework
1.Spring is an open source framework
2.Spring is designed to simplify enterprise-class application development
3.Spring is a Ioc/di and AOP container framework
2. Describe spring in detail
1. Lightweight: Spring is non-intrusive-objects in spring-based applications can be independent of spring's API
2. Dependency Injection/control reversal DI/IOC
3. Aspect-oriented programming AOP aspect oriented programming
4. Container: Spring is a container because it contains and manages the life cycle of the Application object
5. Framework: Spring enables the combination of simple component configurations into a complex application that can be combined with XML and Java annotations in spring
6. One-stop: integration of open source frameworks and excellent third-party libraries for enterprise applications based on IOC and AOP (in fact, spring itself provides presentation layer SPRINGMVC and persistence layer SPRINGJDBC)
3. Build the spring development environment Import jar Package
4.DIP, IOC, DI, and IOC container nouns
1. Dependency inversion principle (DIP): A principle of software architecture design (abstract concept).
The dependency inversion principle, which transforms dependencies, does not depend on the implementation of low-level modules, whereas low-level modules rely on interfaces defined by the upper modules. In layman's parlance, the high-level module defines the interface, and the lower module is responsible for implementation.
Advantages of Dip:
The system is more flexible: You can modify part of the code without affecting other modules.
The system is more robust: you can modify a portion of the code without crashing your system.
The system is more efficient: the components are loosely coupled and reusable, improving development efficiency.
2. Inversion of Control (IoC): A way of reversing flows, dependencies, and interfaces (the specific implementation of the dip).
Dependent objects are not obtained directly through new in the class of the dependent module
3. Dependency Injection (DI): an IOC implementation that reverses dependencies (how IOC is implemented).
1. Constructor injection
2. Attribute Injection Setter Method
3. Interface Injection
4.IoC Container (example: SPRINGIOC): A framework that relies on injection to map dependencies, manage object creation, and the life cycle (di framework).

Spring Learning Notes

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.