gpt4 book ai didi

spring - 在 Spring Boot 执行器中设置 endpoints.health.sensitive=false 时无效

转载 作者:行者123 更新时间:2023-12-04 16:42:39 25 4
gpt4 key购买 nike

在我的 application.yml 中:

endpoints:
restart:
enabled: true
shutdown:
enabled: true
health:
sensitive: false

但是当我请求/health 时,我总是只有:
{"status":"UP"}

有什么想法可以获取更多信息吗?

最佳答案

您是否尝试过访问其他端点?

我认为为执行器端点启用了安全性,因为无法访问完整内容,要访问完整内容,您必须禁用执行器的安全性或必须使用基本身份验证凭据才能访问它。

要禁用安全性,请在 application.yml 中添加以下内容 -

management:
security:
enabled: false

关于spring - 在 Spring Boot 执行器中设置 endpoints.health.sensitive=false 时无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39010414/

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