Skip to content

SpringAop aspectjweaver链兼容性问题 #34

@seizer-zyx

Description

@seizer-zyx

测试环境使用spring-aop:5.2.8
DefaultAdvisorChainFactory#getInterceptorsAndDynamicInterceptionAdvice中config.getAdvisors()的实现与该链参考链�� https://github.com/Ape1ron/SpringAopInDeserializationDemo1 有差异
spring-aop:5.2.8中的实现如下图
Image
Image
所以该属性并未赋值,通过调用advisedSupport#addAdvisor或可以增加兼容性

AdvisedSupport advisedSupport = new AdvisedSupport();
//        Reflections.setFieldValue(advisedSupport,"advisors",advisors);
//        Reflections.setFieldValue(advisedSupport,"advisorArray",advisors.toArray(new Advisor[0]));
Reflections.getMethod(advisedSupport.getClass(), "addAdvisor", new Class[]{Advisor.class}).invoke(advisedSupport, advisor);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions