AnnotationUtils.findAnnotation() should look for annotations on annotations [SPR-5085] #9758
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Bruno Navert opened SPR-5085 and commented
When searching for annotations using AnnotationUtils.findAnnotation(), it should be possible to detect annotations that are present on other annotations.
For instance, imagine a controller class annotated with
@MyController
, where@MyController
is a custom annotation that I created.@MyController
is itself annotated with@Controller
(it is a specialization of controller). It would be nice if the call AnnotationUtils.findAnnotation(handlerType, Controller.class) could, in addition to searching interfaces and super-classes, also look at the annotations (MyController) and look for the requested@Controller
annotation there.Affects: 2.5.4
The text was updated successfully, but these errors were encountered: