Closed
Description
Phil Webb opened SPR-11595 and commented
Background
The StandardAnnotationMetadata
class in Spring Framework 4.0.2 returns false
for isAnnotated
when a class is not directly annotated with an annotation (even if the annotation is present on a superclass). Furthermore, getAnnotationAttributes
and getAllAnnotationAttributes
return null
when querying for the same annotation.
Analysis
The fix for #16100 changed this logic and is causing problems with Spring Boot conditions. Specifically, @Conditional
annotations were never previously considered on super classes (see #15466).
Affects: 4.0.3
Issue Links:
- @Conditional on superclass is ignored [SPR-10840] #15466
@Conditional
on superclass is ignored - Favor more locally declared composed annotations over inherited annotations in AnnotationUtils [SPR-11475] #16100 Favor more locally declared composed annotations over inherited annotations in AnnotationUtils
- Favor more locally declared composed annotations over inherited annotations [SPR-11598] #16221 Favor more locally declared composed annotations over inherited annotations
Referenced from: commits a2f1169