您好,我在 sprinb-boot 2 中使用执行器,具有以下属性
management.endpoints.enabled-by-default=false
management.endpoint.health.enabled=true
我的目标是禁用除健康之外的所有端点。通过此配置,我禁用了除 health 之外的所有内容并现在获取以下端点 "health", "health-component", "health-component-instance"
。是否也可以禁用 "health-component"、"health-component-instance"
?以及如何?
最佳答案
在 Spring Boot 2.2.0.M2 中引入了健康组件端点作为现有 HealthEndpoint
的扩展.
没有配置选项只禁用 /health-component
和 /health-component-instance
,要么整个 health
端点是禁用与否。
关于java - 禁用 spring boot 执行器 "health-component"和 "health-component-instance",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56043811/