文章详情页
springboot 如何禁用某项健康检查
浏览:69日期:2023-02-23 17:16:19
springboot 禁用某项健康检查
management.health.mail.enabledmanagement.health.mongo.enabledmanagement.health.redis.enabledmanagement.health.solr.enabledmanagement.health.elasticsearch.enabled
http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready-customizing-endpoints
springboot加es健康检查问题代码自定义了健康检查路径/actuator/health
但是实际请求的时候走不到自己的代码里
会经过filter拦截掉,拦截之后会经过调用es的健康检查失败,而返回503
解决办法:application.yaml里
management endpoints exposure exclude: health排除health,走自己写的健康检查接口
以上为个人经验,希望能给大家一个参考,也希望大家多多支持好吧啦网。
标签:
Spring
相关文章:
排行榜