{
"ReRoutes": [
{
"UpstreamPathTemplate": "/api/lev2/test",//對外釋出的路徑
"UpstreamHttpMethod": [ "Get" ],
"DownstreamPathTemplate": "/test",//下遊真實api路徑
"DownstreamScheme": "http",
//"DownstreamHostAndPorts": [
// {
// "host": "localhost",//下遊伺服器ip端口
// "port": 5002
// }
//],
"ServiceName": "ApiLev2",//下遊服務在consul注冊的名稱
"LoadBalancerOptions": {
"Type": "LeastConnection"
},
"UseServiceDiscovery": true
}
],
"GlobalConfiguration": {
//"BaseUrl": "https://localhost:5222",//本服務位址
"ServiceDiscoveryProvider": {
"Host": "localhost",//consul的ip端口
"Port": 8500,
"Type": "PollConsul",
"PollingInterval": 100,
"ConfigurationKey": "Oceolot_A" //從consul同步配置
}
}
}