文章目录 cglib动态代理 cglib是基于继承的方式实现的 是继承目标类从而产生代理类 springaop底层使用的就是cglib的动态代理 package com.itheima.cjlibproxy; import net.sf.cglib.proxy.Callback; import net.sf.cglib.proxy.Enhancer; import net.sf.cglib.proxy.MethodInterceptor; import net.sf.cglib.proxy.MethodProxy; import java.lang.reflect.Method; public class CglibProxyUtils { public static Object createProxy(Object targetClass) { Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(targetClass.getClass()); enhancer.setCallback(new...