You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ocelot.Provider.Nacos/demo/ApiGatewayDemo/ocelotconfig.json

24 lines
731 B
JSON

{
// 转发路由,数组中的每个元素都是某个服务的一组路由转发规则
"Routes": [
{
"ServiceName": "productservice",
// Uri方案http、https
"DownstreamScheme": "http",
// 下游(服务提供方)服务路由模板
"DownstreamPathTemplate": "/productapi/{everything}",
// 上游(客户端,服务消费方)请求路由模板
"UpstreamPathTemplate": "/productapi/{everything}",
"UpstreamHttpMethod": [ "Get", "Post" ],
"LoadBalancerOptions": {
"Type": "RoundRobin" //轮询
},
"UseServiceDiscovery": true
}
],
"GlobalConfiguration": {
"ServiceDiscoveryProvider": {
"Type": "Nacos"
}
}
}