Skip to content

Commit

Permalink
fixes problem when cleaning a path with spring regular expressions, i…
Browse files Browse the repository at this point in the history
…t used to delete second colon separated param:{value} .
  • Loading branch information
xmartija committed Sep 20, 2014
1 parent 748aa50 commit 0ffc055
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -59,7 +59,7 @@ public void execute(RequestMappingContext context) {
public String sanitizeRequestMappingPattern(String requestMappingPattern) {
String result = requestMappingPattern;
//remove regex portion '/{businessId:\\w+}'
result = result.replaceAll("\\{(.*?):.*?\\}", "{$1}");
result = result.replaceAll("\\{([^}]*?):.*?\\}", "{$1}");
return result.isEmpty() ? "/" : result;
}
}

0 comments on commit 0ffc055

Please sign in to comment.