AOP (Aspect Oriented Programming) is a programming paradigm that guides developers how to organize program structures
oop(object Oriented Programming)Object-Oriented Programming
Concept and function
Function: Enhance the original design without disturbing it
Core concept
1. Connection Point (JoinPoint)
2 entry point(Pointcut)
3. Notification (Advice)
4. Notification category
5-section (Aspect)
concept
1. Connection point (JoinPoint): anywhere in the program execution process, the granularity is the execution method and throwabnormal, setting variables, etc. in SpringAOP are understood as the execution of methods
2. Pointcut: The equation matching the connection point
In SpringAoP, a point-cut can describe only one specific method or match multiple methods
A specific method: save method with intangible parameters in BookDao interface under the package without return value
Match multiple methods: all save methods, all methods starting with get, any methods in interfaces ending with Dao
All methods with one parameter
3. Notification (Advice): The operation performed at the entry point, that is, the common function
In SpringAOP, the function is finally presented in the form of a method
4. Notification class: class that defines notifications
5.Aspect: Describe the correspondence between notification and entry point
Core concept
1. Target object (Target): The original function removes objects generated by the classes corresponding to the common functions. This kind of object cannot directly complete the final work. Proxy: The target object cannot directly complete the work, and needs to be backfilled in function and implemented through the proxy object of the original object.
Concept: AOP (Aspect Oriented Programming) is an aspect-oriented programming paradigm: to enhance the function of the method without disturbing the original design
5. Core concepts
Proxy: The core essence of SpringAOP is the connection point (JoinPoint) implemented in proxy mode: In SpringAOP, it is understood as the execution of any method.
Pointcut: The formula that matches the connection point is also a method description with common functions.
Notification (Advice): The common functions of several methods are executed at the entry point and are ultimately reflected in a method section: describes the correspondence between notification and entry point
Target object (Target): The original object being proxy becomes the target object