SPR-5251: URI Templates support relative @RequestMappings (on class level, with more specific mapping on method level)

This commit is contained in:
Arjen Poutsma
2008-11-19 17:12:44 +00:00
parent 27ed13f44d
commit efb0ab79f9

View File

@@ -504,7 +504,9 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator implemen
}
}
if (targetHandlerMethods.size() == 1) {
extractHandlerMethodUriTemplates(targetPathMatches.values().iterator().next(), lookupPath, request);
if (targetPathMatches.size() == 1) {
extractHandlerMethodUriTemplates(targetPathMatches.values().iterator().next(), lookupPath, request);
}
return targetHandlerMethods.values().iterator().next();
}
else if (!targetHandlerMethods.isEmpty()) {
@@ -527,7 +529,9 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator implemen
}
}
}
extractHandlerMethodUriTemplates(bestPathMatch, lookupPath, request);
if (bestPathMatch != null) {
extractHandlerMethodUriTemplates(bestPathMatch, lookupPath, request);
}
return targetHandlerMethods.get(bestMappingMatch);
}
else {