【发布时间】:2020-11-25 12:30:37
【问题描述】:
我最近了解到 springboot 2.3.0 提供了 liveness/readiness。为了实现它们,我将 springboot 版本更新为 2.3.0 并在 pom.xml 中添加了依赖 spring-boot-starter-validation。我还更新了 helm chart 的 env 部分以包含:
name: management.health.probes.enabled
value: 'true'
name: management.endpoint.health.group.readiness.include
value: 'readinessState,db'
为了实现组件的活跃性和就绪性探测,我只需要这样做吗?如果是这样,有没有办法在本地进行测试?我的同事告诉我,如果我可以在 application.properties 中本地编写环境,我应该能够在本地测试它(运行邮递员并公开 api,例如 /actuator/health/livness 之类的)。
【问题讨论】:
标签: java spring-boot