Do not link to controller endpoints in Jersey-based Actuator

Closes gh-12463
This commit is contained in:
Andy Wilkinson
2018-03-13 14:11:42 +00:00
parent e02a1fa62b
commit f758a4ddd5
2 changed files with 2 additions and 4 deletions

View File

@@ -62,13 +62,11 @@ class JerseyWebEndpointManagementContextConfiguration {
public ResourceConfigCustomizer webEndpointRegistrar(
WebEndpointsSupplier webEndpointsSupplier,
ServletEndpointsSupplier servletEndpointsSupplier,
ControllerEndpointsSupplier controllerEndpointsSupplier,
EndpointMediaTypes endpointMediaTypes,
WebEndpointProperties webEndpointProperties) {
List<ExposableEndpoint<?>> allEndpoints = new ArrayList<>();
allEndpoints.addAll(webEndpointsSupplier.getEndpoints());
allEndpoints.addAll(servletEndpointsSupplier.getEndpoints());
allEndpoints.addAll(controllerEndpointsSupplier.getEndpoints());
return (resourceConfig) -> {
JerseyEndpointResourceFactory resourceFactory = new JerseyEndpointResourceFactory();
String basePath = webEndpointProperties.getBasePath();

View File

@@ -65,8 +65,8 @@ public class JerseyEndpointIntegrationTests {
.baseUrl("http://localhost:" + port).build();
client.get().uri("/actuator").exchange().expectStatus().isOk()
.expectBody().jsonPath("_links.beans").isNotEmpty()
.jsonPath("_links.restcontroller").isNotEmpty()
.jsonPath("_links.controller").isNotEmpty();
.jsonPath("_links.restcontroller").doesNotExist()
.jsonPath("_links.controller").doesNotExist();
});
}