gpt4 book ai didi

java - 禁用 spring boot 执行器 "health-component"和 "health-component-instance"

转载 作者:塔克拉玛干 更新时间:2023-11-01 22:37:21 26 4
gpt4 key购买 nike

您好,我在 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com