【发布时间】:2015-10-06 13:25:12
【问题描述】:
我编写了一个实现 HealthIndicator 的类,覆盖了健康方法。我回Health.down().withDetail("SupportServiceStatus", "UP").build();
这应该让我的health-endpoint 返回:
{
"status":"UP",
"applicationHealth": {
"status":"UP"
}
}
它只是返回(健康,没有细节):
{
"status":"UP",
}
Javacode(有些简化):
@Component
public class ApplicationHealth implements HealthIndicator {
@Override
public Health health() {
return check();
}
private Health check() {
return Health.up().withDetail("SupportServiceStatus", supportServiceStatusCode).build();
}
}
【问题讨论】:
标签: java spring spring-boot