using Spring Boot I have written a Class (Controller). This Class signature holds a @RequestMapping("path") annotation, and implements an Interface which contains another @RequestMapping("path") annotation like this;
This Interface contained annotation is holded by a method.
Ths issue is that I reach the Class (from a Rest call) but the Interface method doesnt get reached.
This part of the code is not "reading" the Rest call.
I prefer to focus on the impossible, because about the possible we already know too much.
Annotations are only inherited by sub-classes if the annotation itself is annotated with the meta-annotation @Inherited, which @RequestMapping is not. Besides, @Inherited only works when the annotated annotation applies to a class, not to interfaces.
In short, annotations on an interface are not inherited.
He's my best friend. Not yours. Mine. You can have this tiny ad:
global solutions you can do at home or in your backyard