diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredWebOperation.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredWebOperation.java index 75eb021bf6..a2bc7071c7 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredWebOperation.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredWebOperation.java @@ -61,8 +61,8 @@ class DiscoveredWebOperation extends AbstractDiscoveredOperation implements WebO } private String getId(String endpointId, Method method) { - return Stream.of(method.getParameters()).filter(this::hasSelector) - .map(this::dashName).collect(Collectors.joining("", endpointId, "")); + return endpointId + Stream.of(method.getParameters()).filter(this::hasSelector) + .map(this::dashName).collect(Collectors.joining()); } private boolean hasSelector(Parameter parameter) { diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/RequestPredicateFactory.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/RequestPredicateFactory.java index 1672fcb039..8ce5291b81 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/RequestPredicateFactory.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/RequestPredicateFactory.java @@ -62,8 +62,8 @@ class RequestPredicateFactory { } private String getPath(String rootPath, Method method) { - return Stream.of(method.getParameters()).filter(this::hasSelector) - .map(this::slashName).collect(Collectors.joining("", rootPath, "")); + return rootPath + Stream.of(method.getParameters()).filter(this::hasSelector) + .map(this::slashName).collect(Collectors.joining()); } private boolean hasSelector(Parameter parameter) {