use of com.alipay.sofa.healthcheck.service.SofaBootComponentHealthCheckInfo in project sofa-boot by alipay.
the class HealthCheckManager method getHealthIndicator.
public static List<HealthIndicator> getHealthIndicator() {
List<HealthIndicator> healthIndicators = new ArrayList<HealthIndicator>();
Map<String, HealthIndicator> stringToHealthIndicator = applicationContext.getBeansOfType(HealthIndicator.class);
if (!CollectionUtils.isEmpty(stringToHealthIndicator)) {
for (HealthIndicator healthIndicator : stringToHealthIndicator.values()) {
if (!(healthIndicator instanceof SofaBootComponentHealthCheckInfo) && !(healthIndicator instanceof SpringContextHealthCheckInfo)) {
// 排除掉SofaBootComponentHealthCheckInfo 和 SpringContextHealthCheckInfo
healthIndicators.add(healthIndicator);
}
}
}
return healthIndicators;
}
Aggregations