Programming AOP for Facets is a major feature of spring
Aspect Facets: A (Enhanced) class that encapsulates the functionality of a common feature
Advice by: A method of encapsulating enhancements in a slice class.
PointCut: A pointcut, is the concept of a collection that expresses using a regular expression
Before and after all the methods of all core business objects (transactional AOP typical applications)
Joinpoint: Connection point, where the program needs to join advice, and the ponitcut being executed
Weaving (Weaving): The process of integrating aspect and core business objects.
Implementing AOP through specific interfaces
Types of AOP Notifications:
Before: front-facing notification
After: Post notification
Around: Surround Notifications
Throwing: Exception notification
Here is a common example of life: cut watermelon = aspect-oriented programming AOP
Cut the watermelon first to have a knife, and this knife is like writing a need to cut the various methods
Configure the appropriate pointcuts in the configuration file
Then, cut down = Execute the program, when the program executes, the chopper (slice) becomes part of the watermelon (object) and is executed by a piece.
In the simplest sentence, the service layer is cut in half and the log and transaction commits are added.
A personal understanding of aspect-oriented programming (AOP) in spring