|
@Override |
|
protected Resource createResource(EndpointMapping endpointMapping, WebOperation operation) { |
|
WebOperationRequestPredicate requestPredicate = operation.getRequestPredicate(); |
|
String matchAllRemainingPathSegmentsVariable = requestPredicate.getMatchAllRemainingPathSegmentsVariable(); |
|
if (matchAllRemainingPathSegmentsVariable != null) { |
|
for (HealthEndpointGroup group : this.groups) { |
|
AdditionalHealthEndpointPath additionalPath = group.getAdditionalPath(); |
|
if (additionalPath != null) { |
|
return getResource(endpointMapping, operation, requestPredicate, additionalPath.getValue(), |
|
this.serverNamespace, (data, pathSegmentsVariable) -> data.getUriInfo().getPath()); |
|
} |
|
} |
|
} |
|
return null; |
|
} |
When using Spring Boot with both Jersey and Actuator, the health endpoint only allows one health group to have an additional-path configured. All other additional paths are ignored except for the first that appears in the configuration file.
management.endpoint.health.group.liveness.additional-path=server:/health1
management.endpoint.health.group.readiness.additional-path=server:/ready1
Only /health1 will be available as a JAX-RS Resource. The available health endpoints will be:
/actuator/health/liveness
/actuator/health/readiness
/health1
spring-boot/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/jersey/JerseyHealthEndpointAdditionalPathResourceFactory.java
Lines 50 to 64 in f978051
When using Spring Boot with both Jersey and Actuator, the health endpoint only allows one health group to have an
additional-pathconfigured. All other additional paths are ignored except for the first that appears in the configuration file.Only /health1 will be available as a JAX-RS Resource. The available health endpoints will be:
/actuator/health/liveness/actuator/health/readiness/health1