EurekaHealthCheckHandler: Added protected getter to obtain CompositeHealthIndicator (#2583)
* Adding protected getter to obtain CompositeHealthIndicator. This allows subclasses to obtain this indicator's health details map which is useful for error reporting.
This commit is contained in:
@@ -100,7 +100,7 @@ public class EurekaHealthCheckHandler implements HealthCheckHandler, Application
|
||||
}
|
||||
|
||||
protected InstanceStatus getHealthStatus() {
|
||||
final Status status = healthIndicator.health().getStatus();
|
||||
final Status status = getHealthIndicator().health().getStatus();
|
||||
return mapToInstanceStatus(status);
|
||||
}
|
||||
|
||||
@@ -110,4 +110,8 @@ public class EurekaHealthCheckHandler implements HealthCheckHandler, Application
|
||||
}
|
||||
return STATUS_MAPPING.get(status);
|
||||
}
|
||||
|
||||
protected CompositeHealthIndicator getHealthIndicator() {
|
||||
return healthIndicator;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user