Skip to content

Commit b25e222

Browse files
committed
Retain original case when mapping endpoint paths
Update `MappingWebEndpointPathMapper` to keep the original case rather than using a lower-case version. Closes gh-14773
1 parent 935d621 commit b25e222

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/MappingWebEndpointPathMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public String getRootPath(String endpointId) {
4646

4747
@Override
4848
public String getRootPath(EndpointId endpointId) {
49-
return this.pathMapping.getOrDefault(endpointId, endpointId.toLowerCaseString());
49+
return this.pathMapping.getOrDefault(endpointId, endpointId.toString());
5050
}
5151

5252
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/MappingWebEndpointPathMapperTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void mixedCaseDefaultConfiguration() {
5050
MappingWebEndpointPathMapper mapper = new MappingWebEndpointPathMapper(
5151
Collections.emptyMap());
5252
assertThat(mapper.getRootPath(EndpointId.of("testEndpoint")))
53-
.isEqualTo("testendpoint");
53+
.isEqualTo("testEndpoint");
5454
}
5555

5656
@Test

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/PathMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public String getRootPath(String endpointId) {
6363

6464
@Override
6565
public String getRootPath(EndpointId endpointId) {
66-
return endpointId.toLowerCaseString();
66+
return endpointId.toString();
6767
}
6868

6969
};

0 commit comments

Comments
 (0)