对于最新的稳定版本,请使用 Spring Cloud Config 4.3.0! |
健康指标
Config Server 附带一个运行状况指示器,用于检查配置的EnvironmentRepository
正在发挥作用。
默认情况下,它会询问EnvironmentRepository
对于名为app
这default
profile,以及EnvironmentRepository
实现。
您可以配置运行状况指示器以检查更多应用程序以及自定义配置文件和自定义标签,如以下示例所示:
spring:
cloud:
config:
server:
health:
repositories:
myservice:
label: mylabel
myservice-dev:
name: myservice
profiles: development
您可以通过设置spring.cloud.config.server.health.enabled=false
.
此外,您还可以提供自定义down
通过设置属性来获取您自己的状态spring.cloud.config.server.health.down-health-status
(值为"DOWN'
默认情况下)。