Browse Source

Merge branch '2.0.x'

pull/13625/merge
Stephane Nicoll 8 years ago
parent
commit
fa171671b1
  1. 8
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java

8
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java

@ -299,16 +299,16 @@ public final class EndpointRequest { @@ -299,16 +299,16 @@ public final class EndpointRequest {
List<RequestMatcher> antPath(String... parts) {
List<RequestMatcher> matchers = new ArrayList<>();
this.servletPaths.stream().map((p) -> {
if (StringUtils.hasText(p)) {
if (StringUtils.hasText(p) && !p.equals("/")) {
return p;
}
return "";
}).distinct().forEach((path) -> {
String pattern = (path.equals("/") ? "" : path);
StringBuilder pattern = new StringBuilder(path);
for (String part : parts) {
pattern += part;
pattern.append(part);
}
matchers.add(new AntPathRequestMatcher(pattern));
matchers.add(new AntPathRequestMatcher(pattern.toString()));
});
return matchers;
}

Loading…
Cancel
Save