Closed
Description
Sam Brannen opened SPR-12793 and commented
Status Quo
The getAnnotation()
method in TypeDescriptor
currently only supports a single level of meta-annotations.
In other words, meta-annotations on meta-annotations will never be found, and this does not align with Spring's standard support for meta-annotations with arbitrary levels.
For example, @NumberFormat
and @DateTimeFormat
are supported as meta-annotations but not as meta-meta-annotations.
Deliverables
- Alter the search algorithm used in
TypeDescriptor.getAnnotation()
so that arbitrary levels of meta-annotations are supported.
Affects: 3.2 GA
Issue Links:
- Support @NumberFormat as a meta-annotation [SPR-12743] #17340 Support
@NumberFormat
as a meta-annotation ("depends on") - AnnotationUtils.findAnnotation() should support arbitrary levels of meta-annotations [SPR-11448] #16074 AnnotationUtils.findAnnotation() should support arbitrary levels of meta-annotations
- MetaAnnotationUtils should support arbitrary levels of meta-annotations [SPR-11470] #16095 MetaAnnotationUtils should support arbitrary levels of meta-annotations
Referenced from: commits 04d6afe