{
  "Routes": [
    {
      "DownstreamPathTemplate": "/{url}",
      "DownstreamScheme": "http",
      //"UseServiceDiscovery": true,
      "UpstreamPathTemplate": "/{url}",
      "UpstreamHttpMethod": [ "Get" ],
      "ServiceName": "zklService",
      "LoadBalancerOptions": {
        "Type": "LeastConnection"
      }
    }
  ],
  "GlobalConfiguration": {
    "BaseUrl": "http://localhost:6299",
    "ServiceDiscoveryProvider": {
      "Scheme": "http",
      "Host": "localhost",
      "Port": 8500,
      "Type": "Consul"
    }
  }
}

 

Ocelot 版本 16.0.1 + Consul  配置文件格式

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2021-08-16
  • 2022-02-19
  • 2022-12-23
猜你喜欢
  • 2022-02-20
  • 2021-11-08
  • 2022-12-23
  • 2021-11-29
  • 2022-03-09
  • 2021-05-17
  • 2021-04-20
相关资源
相似解决方案