文章詳情頁
springboot 如何禁用某項健康檢查
瀏覽:65日期: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
相關文章:
排行榜