There are several concepts in AOP:
-Square/Facet (Aspect): A focus of modularity, this focus implementation may be additional crosscutting multiple objects. Transaction management is a good example of crosscutting concerns in the Java EE application. The aspect is implemented with spring's advisor or interceptor.
-Connection point/Weaving Point (joinpoint): an explicit point in the execution of a program, such as a call to a method or a particular exception being thrown.
-Notification (Advice): The action performed by the AOP framework at a specific connection point. Various types of notifications include "around", "before", and "throws" notifications.
-Pointcut (Pointcut): Specifies a collection of connection points to which a notification will be raised. The AOP framework must allow developers to specify pointcuts, for example, using regular expressions.
So "<aop:aspect>" actually defines the crosscutting logic, which is what is done on the connection point, and "<aop:advisor>" defines what the connection points apply <aop:aspect>. The benefit of spring is that multiple cross-cutting logic (that is, <aop:aspect> defined) can be used multiple times to provide reusability.
1. Adivisor is a special kind of aspect,advisor that represents spring aspect
2. Difference: Advisor only holds one pointcut and one advice, while aspect can be multiple pointcut and multiple advice
Tingfeng the Understanding :
Above
Our usual program execution can be seen as a horizontal arrow with linear execution characteristics ;
The small blue box can be called the break-in process of the linear execution of the pointcut PointCut;
There is a Pointcut, then you can execute the relevant logic on the Pointcut , Logitech is divided into two kinds , one is adivisor, There is also a Aspect;
Where the Advisor is like the small red circle on the left , can only have a advice, is a point logic ;
The downward arrow on the right can be thought of as Aspect, which can have multiple logical execution and is a polygon logic ;
The difference between adivisor and aspect in spring (self-understanding)