Current location - Quotes Website - Personality signature - What are the ways to realize AOP?
What are the ways to realize AOP?
There are three common ways to achieve this:

1. Using proxy mode to realize AOP dynamically can be divided into static proxy, dynamic proxy and CGLIB generation subclass proxy according to specific technical details.

2. Use precompiled method to execute the proxy statically.

3. Use the method of custom loader for dynamic proxy.

The latter two proxies can proxy more contents (such as constructors, static methods, static blocks, final methods, private methods, etc.). ).