The main idea behind AOP is that you create new typed object, based on a dynamic proxy mechanism, that implements a set of interfaces at runtime.
AOP背后的主要思想是基于动态代理机制创建新的对象类型,该对象会在运行时实现一些接口。
But one of the best features of AOP is that it comes in several different flavors and implementations (i.e., proxy-based, byte-code weaving etc...).
但是AOP最好的特性之一就是它可以有多种不同的风格和实现(例如,基于代理的,字节码编织等等……)。
Note that some frameworks, such as Spring AOP and Hibernate, often use both the CGLIB library and the JDK dynamic proxy to meet their needs.
需要注意的是一些框架例如spring AOP和Hibernate,它们为了满足需要经常同时使用JDK的动态代理和CGLIB包。
应用推荐