Commit fa171671 authored by Stephane Nicoll's avatar Stephane Nicoll

Merge branch '2.0.x'

parents d17d6374 e6ea28de
...@@ -299,16 +299,16 @@ public final class EndpointRequest { ...@@ -299,16 +299,16 @@ public final class EndpointRequest {
List<RequestMatcher> antPath(String... parts) { List<RequestMatcher> antPath(String... parts) {
List<RequestMatcher> matchers = new ArrayList<>(); List<RequestMatcher> matchers = new ArrayList<>();
this.servletPaths.stream().map((p) -> { this.servletPaths.stream().map((p) -> {
if (StringUtils.hasText(p)) { if (StringUtils.hasText(p) && !p.equals("/")) {
return p; return p;
} }
return ""; return "";
}).distinct().forEach((path) -> { }).distinct().forEach((path) -> {
String pattern = (path.equals("/") ? "" : path); StringBuilder pattern = new StringBuilder(path);
for (String part : parts) { for (String part : parts) {
pattern += part; pattern.append(part);
} }
matchers.add(new AntPathRequestMatcher(pattern)); matchers.add(new AntPathRequestMatcher(pattern.toString()));
}); });
return matchers; return matchers;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment