【Spring Cloud Config 系列】- 健康指示器 / Health Indicator

健康指示器 / Health Indicator

配置服務器附帶一個健康指示器,用於檢查配置的環境存儲庫是否工作。
默認情況下會像環境存儲庫(EnvironmentRepository)請求 application=app、profile=default、label=default 的文件

可以通過配置檢查更多的文件

spring:
  cloud:
    config:
      server:
        health:
          repositories:
            myservice:
              label: mylabel
            myservice-dev:
              name: myservice
              profiles: development
          enabled: false  # 可以關閉健康檢查    

::: tip tip
此配置沒有測試通,不知道是什麼意思,沒有看到有日誌;
:::

Spring Cloud Config 系列 導航目錄

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章