<develop>:(ShopERP 端)<无> ApiGateWay 优化。

parent 8c8c1fa4
......@@ -14,15 +14,15 @@ namespace ShopERP.Ocelot.ApiGateWay
// Add services to the container.
builder.Services.AddControllersWithViews();
//将 服务发现,注册到容器中
builder.Services.AddTransient<ConsulServiceDiscover>();
////添加 Ocelot 并添加配置文件
builder.Configuration.AddJsonFile("ocelot.json", optional: true, reloadOnChange: true);
//使用 Ocelot 接管代码
builder.Services.AddOcelot(builder.Configuration);
//将 服务发现,注册到容器中
builder.Services.AddTransient<ConsulServiceDiscover>();
var app = builder.Build();
// Configure the HTTP request pipeline.
......
......@@ -8,7 +8,7 @@
"AllowedHosts": "*",
"Consul": {
"consulAddress": "http://127.0.0.1:8500",
"serviceName": "platform",
"serviceName": "api",
"apiServiceName": "api"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment