Spring Learning Note four: AOP

Source: Internet
Author: User

AOP (Aspect Orient programming), aspect-oriented programming is a complement to object-oriented programming oops

Object-oriented programming uses a static perspective to consider the structure of a program, while aspect-oriented programming is a dynamic consideration of the program's running process

The underlying AOP is implemented using dynamic proxy mode. Two kinds of proxies are used: Dynamic proxy domain cglib dynamic proxy of JDK

AOP Programming belongs to:

1. Facets (Aspect)

Tangent refers to cross-service logic

2. Weave in (weaving)

Weaving refers to the process of inserting slice code into a target object

3. Entry point (Pointcut)

A pointcut refers to the location of a plane's specific weave.

4. Destination object (target)

Target object refers to the object that will be enhanced

5. Notice (Advice)

Notification is a specific implementation of the aspect, can complete simple weaving function

6. Advisor (advisor)

A consultant is another implementation of a slice that can weave a notification into a target object in a more complex way, and is the assembler that wraps the notification as a more duplicated slice

Spring's AOP programming environment builds

1. Create a MAVEN project to configure the jar packages required by spring's AOP

Spring Learning Note four: AOP

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.