[v现象]springbootAutowiredBeanNotOfRequiredTypeException

//org.springframework.aop.framework.DefaultAopProxyFactory

//模块AdvisedSupport 是Spring AOP实用性有关类

public AopProxy createAopProxy(AdvisedSupport advisedSupport)

throws AopConfigException {

//在此推论采用JDK静态全权却是CGLIB全权

if (advisedSupport.isOptimize() || advisedSupport.isProxyTargetClass()

|| hasNoUserSuppliedProxyInterfaces(advisedSupport)) {

if (!cglibAvailable) {

throw new AopConfigException(

"Cannot proxy target class because CGLIB2 is not available. "

+ "Add CGLIB to the class path or specify proxy interfaces.");

}

return CglibProxyFactory.createCglibProxy(advisedSupport);

} else {

return new JdkDynamicAopProxy(advisedSupport);

}

}

发布于 2022-09-27 08:09:42
收藏
分享
海报
107
上一篇:[v现象]cglib动态代理导致注解丢失问题及如何修改注解允许被继承 下一篇:[v现象]【汽车人】200万辆“CR-V现象”,值得深思与借鉴
目录