JdkDynamicAopProxy 属性AdvisedSupport ,它是aop 代理的配置。当我们创建代理的时候会将config传递进去。
JdkDynamicAopProxy 获取代理:生成jdk原生动态代理对象,同时将自己传递进去,实现了InvocationHandler 的接口,
@Override
public Object getProxy(@Nullable ClassLoader classLoader) {
if (logger.isDebugEnabled()) {
logger.debug("Creating JDK dynamic proxy: target source is " + this.advised.getTargetSource());
}
Class<?>[] proxiedInterfaces = AopProxyUtils.completeProxiedInterfaces(this.advised, true);
findDefinedEqualsAndHashCodeMethods(proxiedInterfaces);
return Proxy.newProxyInstance(classLoader, proxiedInterfaces, this);
}
invoke方法:从AdvisedSupport获取拦截器递归执行方法拦截