Spring之AOP底层源码解析(上)【TL spring13】

📅 2026/8/18 11:21:46
Spring之AOP底层源码解析(上)【TL spring13】
cglib Enhancer enhancer new Enhanceraop是通过父子类来实现的jdk动态代理Proxy.newProxyInstance()spring提供的ProxyFactory MethodInterceptorAdvisor Pointcut AdviceImporta.class将a实例化为一个beanDefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator配合 DefaultPointcutAdvisorspring aop使用注解需要单独引入adpectj的jar包EnableAspectJAutoProxy等同于Import(AnnotationAwareAspectJAutoProxyCreator.class)TargetSource里面的getTarget()方法被代理对象 Lazy getTarget() 被代理对象buildLazyResolutionProxy