Skip to content

Commit f758a4d

Browse files
committed
Do not link to controller endpoints in Jersey-based Actuator
Closes gh-12463
1 parent e02a1fa commit f758a4d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,11 @@ class JerseyWebEndpointManagementContextConfiguration {
6262
public ResourceConfigCustomizer webEndpointRegistrar(
6363
WebEndpointsSupplier webEndpointsSupplier,
6464
ServletEndpointsSupplier servletEndpointsSupplier,
65-
ControllerEndpointsSupplier controllerEndpointsSupplier,
6665
EndpointMediaTypes endpointMediaTypes,
6766
WebEndpointProperties webEndpointProperties) {
6867
List<ExposableEndpoint<?>> allEndpoints = new ArrayList<>();
6968
allEndpoints.addAll(webEndpointsSupplier.getEndpoints());
7069
allEndpoints.addAll(servletEndpointsSupplier.getEndpoints());
71-
allEndpoints.addAll(controllerEndpointsSupplier.getEndpoints());
7270
return (resourceConfig) -> {
7371
JerseyEndpointResourceFactory resourceFactory = new JerseyEndpointResourceFactory();
7472
String basePath = webEndpointProperties.getBasePath();

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyEndpointIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public void linksAreProvidedToAllEndpointTypes() throws Exception {
6565
.baseUrl("http://localhost:" + port).build();
6666
client.get().uri("/actuator").exchange().expectStatus().isOk()
6767
.expectBody().jsonPath("_links.beans").isNotEmpty()
68-
.jsonPath("_links.restcontroller").isNotEmpty()
69-
.jsonPath("_links.controller").isNotEmpty();
68+
.jsonPath("_links.restcontroller").doesNotExist()
69+
.jsonPath("_links.controller").doesNotExist();
7070
});
7171
}
7272

0 commit comments

Comments
 (0)