Spring boot - application.yml 常用配置详解
服务注册中心配置
Bean类:org.springframework.cloud.netflix.eureka.server.EurekaServerConfigBean
配置参数 | 默认值 | 说明 |
---|---|---|
eureka.server.enable-self-preservation | false | 关闭注册中心的保护机制,Eureka 会统计15分钟之内心跳失败的比例低于85%将会触发保护机制,不剔除服务提供者,如果关闭服务注册中心将不可用的实例正确剔除 |
服务实例类配置
Bean类:org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean
配置参数 | 默认值 | 说明 |
---|---|---|
eureka.instance.prefer-ip-address | FALSE | 不使用主机名来定义注册中心的地址,而使用IP地址的形式,如果设置了eureka.instance.ip-address |