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

标签 java spring spring-boot spring-boot-actuator

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

相关文章:

java - 在 Spring Data neo4j 中使用 RelationshipEntity 保存节点的正确方法是什么?

规范中的 Spring 数据子查询

java - 如何在 Spring Boot 中发送并确认消息已传递到 RabbitMQ?

java - Spring Boot使用pathvariable从url获取id

Java 字节缓冲区覆盖字节

java - 如何提高以下程序 "Remove duplicates from an array"的时间复杂度?

eclipse - 无需停止和启动即可将 Eclipse Spring MVC 项目部署到 Tomcat

Spring Vault Integration - 从多个路径读取 secret

java - 组织.postgresql.util.PSQLException : ERROR: syntax error at or near ":"

java - Facebook Messenger 不发送消息