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

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2863 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Arjen Poutsma
2010-01-26 10:47:36 +00:00
parent 2e974ce47b
commit 5746e04fa8
2 changed files with 39 additions and 6 deletions
@@ -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))) {