W3Cschool
恭喜您成為首批注冊用戶
獲得88經驗值獎勵
Consul實例的運行狀況檢查默認為“ / health”,這是Spring Boot Actuator應用程序中有用端點的默認位置。如果您使用非默認上下文路徑或Servlet路徑(例如server.servletPath=/foo
)或管理端點路徑(例如management.server.servlet.context-path=/admin
),則即使對于Actuator應用程序,也需要更改它們。也可以配置Consul用于檢查運行狀況端點的間隔。“ 10s”和“ 1m”分別代表10秒和1分鐘。例:
application.yml。
spring: cloud: consul: discovery: healthCheckPath: ${management.server.servlet.context-path}/health healthCheckInterval: 15s
您可以通過設置management.health.consul.enabled=false
來禁用運行狀況檢查。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯系方式:
更多建議: