通过属性禁用Spring-Cloud-Consul健康指标

时间:2018-07-02 17:58:15

标签: spring-cloud spring-cloud-consul

您可以通过在 Alamofire.request(WalletRouter.urlUserActiveOrder(id: userId)).responseJSON { response in if let value = response.result.value { let dict = value as? Dictionary<String, AnyObject> //print (value) if let innerDict = dict!["data"] { print (innerDict) //manage to return the value let data = innerDict["transactions"] as! NSArray //get error here print (data) } } //do your json stuff else if (response.result.isFailure) { //Manager your error switch (response.error!._code){ case NSURLErrorTimedOut: //Manager your time out error break case NSURLErrorNotConnectedToInternet: //Manager your not connected to internet error break default: print ("error") } } } 之后加载的属性源来配置属性management.health.consul.enabled吗?

1 个答案:

答案 0 :(得分:-1)

另见this issue。使用 Spring Boot 2.3.7.RELEASE,我可以通过属性 management.health.consul.enabled 启用/禁用 Consul 健康指示器,没有任何问题。