Spring AOP does not propagate arguments for dynamic prototype-scoped advice #28407
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Uh oh!
There was an error while loading. Please reload this page.
If we use prototype aspect expression, and we need args type is String, but we can input other type class,the aspect method is work.
code like this:
the console will output:
I see the code:
this kind AspectJ will obtain
PerTargetInstantiationModelPointcut
and its dynamic-match method isboolean matches(Method method, Class<?> targetClass)
not
boolean matches(Method method, Class<?> targetClass, Object... args)
so, it lost dynamic judge, so we can pass the AspectJ with a Integer or Other args, because it only calculates static-match method, the
Child.setStrings(Object object)
will pass any object.The text was updated successfully, but these errors were encountered: