use of org.springframework.boot.actuate.endpoint.mvc.HalJsonMvcEndpoint in project spring-boot by spring-projects.
the class CloudFoundryEndpointHandlerMapping method postProcessEndpoints.
@Override
protected void postProcessEndpoints(Set<NamedMvcEndpoint> endpoints) {
super.postProcessEndpoints(endpoints);
Iterator<NamedMvcEndpoint> iterator = endpoints.iterator();
HealthMvcEndpoint healthMvcEndpoint = null;
while (iterator.hasNext()) {
NamedMvcEndpoint endpoint = iterator.next();
if (endpoint instanceof HalJsonMvcEndpoint) {
iterator.remove();
} else if (endpoint instanceof HealthMvcEndpoint) {
iterator.remove();
healthMvcEndpoint = (HealthMvcEndpoint) endpoint;
}
}
if (healthMvcEndpoint != null) {
endpoints.add(new CloudFoundryHealthMvcEndpoint(healthMvcEndpoint.getDelegate()));
}
}
Aggregations