SPR-6206 - When looking up methods with @RequestMapping annotation, unannotated bridge methods are included

This commit is contained in:
Arjen Poutsma
2009-10-14 12:24:04 +00:00
parent 52ad49b3ae
commit 17d5b31af3
3 changed files with 162 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ public class HandlerMethodResolver {
ReflectionUtils.doWithMethods(currentHandlerType, new ReflectionUtils.MethodCallback() {
public void doWith(Method method) {
Method specificMethod = ClassUtils.getMostSpecificMethod(method, currentHandlerType);
if (isHandlerMethod(specificMethod)) {
if (isHandlerMethod(method)) {
handlerMethods.add(specificMethod);
}
else if (method.isAnnotationPresent(InitBinder.class)) {
@@ -99,7 +99,7 @@ public class HandlerMethodResolver {
}
protected boolean isHandlerMethod(Method method) {
return AnnotationUtils.findAnnotation(method, RequestMapping.class) != null;
return method.isAnnotationPresent(RequestMapping.class);
}