SPR-6649 - Request mapping incorrectly receiving all dispatches for a controller

This commit is contained in:
Arjen Poutsma
2010-01-26 10:47:36 +00:00
parent 2f840b1097
commit ead5df4546
2 changed files with 39 additions and 6 deletions

View File

@@ -596,7 +596,7 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
return null;
}
String bestMatchingPattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
if (StringUtils.hasText(bestMatchingPattern)) {
if (StringUtils.hasText(bestMatchingPattern) && bestMatchingPattern.endsWith("*")) {
String combinedPattern = pathMatcher.combine(bestMatchingPattern, methodLevelPattern);
if (!combinedPattern.equals(bestMatchingPattern) &&
(isPathMatchInternal(combinedPattern, lookupPath))) {