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