Closed
Description
Juergen Hoeller opened SPR-16757 and commented
After the changes for #21218, AopUtils.getMostSpecificMethod
does not resolve proxy class methods anymore. It turns out that this is a regression for some scenarios, in particular for dynamic proxies as targets with their redeclaration of all interface methods at the most specific level. In order for Method.getDeclaringClass()
to expose the concrete type again in such scenarios, we should rather revisit that algorithm to not specifically handle proxy class methods, just consistently skipping resolution for CGLIB cases (in particular configuration classes and lookup-method classes) as we did in a few places before already.
Affects: 5.0.5
Issue Links:
- AspectJ execution pointcut does not detect methods in superinterface anymore [SPR-16723] #21264 AspectJ execution pointcut does not detect methods in superinterface anymore
- Comprehensively cache annotated methods for interfaces and superclasses [SPR-16675] #21216 Comprehensively cache annotated methods for interfaces and superclasses
- Mixed use BeanNameAutoProxyCreator and AnnotationAwareAspectJAutoProxyCreator to proxy same bean [SPR-16677] #21218 Mixed use BeanNameAutoProxyCreator and AnnotationAwareAspectJAutoProxyCreator to proxy same bean
- AspectJ annotation pointcuts fail to evaluate against interface-based proxies [SPR-16803] #21343 AspectJ annotation pointcuts fail to evaluate against interface-based proxies
- Spring 5.x DataSource proxying does not work with Oracle UCP on JDK 9+ [SPR-17003] #21541 Spring 5.x DataSource proxying does not work with Oracle UCP on JDK 9+
- Consistent target method resolution for event and caching expressions [SPR-16779] #21319 Consistent target method resolution for event and caching expressions