Require type-level @Controller annotation

Closes gh-22154
This commit is contained in:
Rossen Stoyanchev
2021-12-14 07:09:08 +00:00
parent 2db6795a1a
commit 3600644ed1
6 changed files with 53 additions and 16 deletions

View File

@@ -133,8 +133,7 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
*/
@Override
protected boolean isHandler(Class<?> beanType) {
return (AnnotatedElementUtils.hasAnnotation(beanType, Controller.class) ||
AnnotatedElementUtils.hasAnnotation(beanType, RequestMapping.class));
return AnnotatedElementUtils.hasAnnotation(beanType, Controller.class);
}
/**