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 a2bc7071c7..75eb021bf6 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 endpointId + Stream.of(method.getParameters()).filter(this::hasSelector) - .map(this::dashName).collect(Collectors.joining()); + return Stream.of(method.getParameters()).filter(this::hasSelector) + .map(this::dashName).collect(Collectors.joining("", endpointId, "")); } 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 8ce5291b81..1672fcb039 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 rootPath + Stream.of(method.getParameters()).filter(this::hasSelector) - .map(this::slashName).collect(Collectors.joining()); + return Stream.of(method.getParameters()).filter(this::hasSelector) + .map(this::slashName).collect(Collectors.joining("", rootPath, "")); } private boolean hasSelector(Parameter parameter) {