in the Aop of Spring, the Advice (notification) is used to enhance the functionality of the proxied class.
the types of Advice (notification) are: BeforeAdvice, AfterReturningAdvice, ThreowSadvice.
there are corresponding interceptors for each type of Advice, MethodBeforeAdviceInterceptor, AfterReturningAdviceInterceptor, ThrowsAdviceInterceptor.
Spring needs to encapsulate each Advice (notification) into a corresponding interceptor type and return it to the container, so the Advice needs to be transformed using the adapter pattern. Let"s take a look at the specific code.
details: https://blog.csdn.net/adoocok.
question: after reading the adapter, you will probably be able to understand its ideas. After reading this article, I feel that I don"t quite understand it. AdvisorAdapter is just realized in this article. How did it become the adapter mode? And it doesn"t seem to match or object adaptation
in the class in the adapter pattern, so I think the example in this article is a little far-fetched to apply the adapter pattern? Is there a great god who can explain it in detail?