商城首页欢迎来到中国正版软件门户

您的位置:首页 >springboot怎么禁用某项健康检查

springboot怎么禁用某项健康检查

  发布于2023-05-11 阅读(0)

扫一扫,手机访问

springboot 禁用某项健康检查

management.health.mail.enabled
management.health.mongo.enabled
management.health.redis.enabled
management.health.solr.enabled
management.health.elasticsearch.enabled

springboot加es健康检查问题

代码自定义了健康检查路径/actuator/health

但是实际请求的时候走不到自己的代码里

会经过filter拦截掉,拦截之后会经过调用es的健康检查失败,而返回503

解决办法:

application.yaml里

  • management

  • endpoints

  • exposure

  • exclude: health

排除health,走自己写的健康检查接口

本文转载于:https://www.yisu.com/zixun/592305.html 如有侵犯,请联系zhengruancom@outlook.com删除。
免责声明:正软商城发布此文仅为传递信息,不代表正软商城认同其观点或证实其描述。

热门关注