Resilience4J对于Spring Boot - registerHealthIndicator: true的作用是什么?

4
在Spring Boot的Resilience4J中,registerHealthIndicator: true的作用是什么?
文档https://resilience4j.readme.io/docs/getting-started-3#health-endpoint说,如果我们在application.yml中进行以下配置,我们可以在健康端点中看到断路器的状态。
management.health.circuitbreakers.enabled: true
resilience4j.circuitbreaker:
  configs:
    default:
      registerHealthIndicator: true

当我尝试访问执行器健康端点 - http://localhost:8080/actuator/health,我只能看到一个状态: {"status":"UP"}。其中没有关于断路器的详细信息。
是否有任何配置遗漏了健康端点?
注意:我能够在其他端点中看到断路器的详细信息,例如 - http://localhost:8080/actuator/circuitbreakerevents - http://localhost:8080/actuator/circuitbreakers
1个回答

2
为了在/health端点中查看详细信息,您需要更改management.endpoint.health.show-details配置属性。它定义了何时显示完整的健康详细信息,默认情况下其值为never。您需要将其实际配置为always,如下所示:
management.endpoint.health.show-details = always

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接