Skip to content

Only one health group can be exposed using management.endpoint.health.group.xxx.additional-path=server:/newpath when using Jersey #36250

@kent-rosenkoetter-at-nordstrom

Description

@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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions