Spring AOP Basic Concepts

Source: Internet
Author: User

Spring AOP Basic Concepts Directory
    • Spring AOP Definition
      • Basic terminology for AOP
      • Notification type
AOP defines AOP basic terminology
    • Facets ( Aspect ): A modular focus that can cross-cut multiple objects. For spring AOP, facets are ordinary classes (schema-based) or classes that use @Aspect annotations.
    • Joint Point: A point in the course of a program's execution. For spring AOP, the connection point is the execution of the method.
    • Notification ( Advice ): An action performed on a connection point by a slice.
    • Pointcut ( PointCut ): An assertion that matches a connection point.
    • Introduce ( Introduction ): Add an additional method or domain for an existing type.
    • Target object: An object that is notified by one or more facets, also known as the notified object . Because spring AOP is implemented by the runtime proxy, the object is always a proxy object.
    • AOP Proxy: An object created by the AOP framework in order to implement a tangent contract (notification method execution, etc.). In the spring framework, an AOP proxy can be implemented with the JDK dynamic agent or the Cglib proxy.
    • Weaving ( Weaving ): Joins a slice with other app types or objects and creates the notified object. Spring AOP performs a weaving operation at run time.
Notification type
    • Pre-notification ( before Advice ): A notification that is executed before the connection point, which does not block the execution process before the connection point (unless an exception is thrown).
    • Return notification (after returning Advice ): A notification that is executed after the connection point is completed normally.
    • Exception notification (after throwing Advice ): A notification that is executed after the method exits because of an exception thrown.
    • Final notification (after (finally) Advice ): A notification that is executed after the connection point exits regardless of the reason.
    • Surround notification ( Around Advice ): A notification that surrounds a connection point, such as a method call. Surround notifications are the most common types of notifications.

Spring AOP Basic Concepts

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.