Commit ddea0548 by 赵剑炜

调整框架

parent c46b4acc
...@@ -28,7 +28,7 @@ namespace ApiGateway ...@@ -28,7 +28,7 @@ namespace ApiGateway
} }
public static IHostBuilder CreateHostBuilder(string[] args) => public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args) Host.CreateDefaultBuilder(args)
.UseNacosConfig(section: "Nacos", parser: null, logAction: null) .UseNacosConfig(section: "Nacos", parser: null, logAction: null)
.ConfigureWebHostDefaults(webBuilder => .ConfigureWebHostDefaults(webBuilder =>
{ {
......
...@@ -6,19 +6,10 @@ ...@@ -6,19 +6,10 @@
"launchUrl": "http://192.168.3.188:3993/nacos", "launchUrl": "http://192.168.3.188:3993/nacos",
"applicationUrl": "http://192.168.3.1:5000;http://192.168.10.88:5000;http://localhost:5001;http://localhost:5000;" "applicationUrl": "http://192.168.3.1:5000;http://192.168.10.88:5000;http://localhost:5001;http://localhost:5000;"
}, },
"WSL": {
"commandName": "WSL2",
"launchBrowser": true,
"launchUrl": "http://localhost:6003",
"environmentVariables": {
"ASPNETCORE_URLS": "http://localhost:6003"
},
"distributionName": ""
},
"ApiGateway": { "ApiGateway": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true, "launchBrowser": true,
"applicationUrl": "http://localhost:6003" "applicationUrl": "http://localhost:6005"
} }
}, },
"iisSettings": { "iisSettings": {
......
...@@ -31,6 +31,7 @@ namespace ApiGateway ...@@ -31,6 +31,7 @@ namespace ApiGateway
Func<IServiceProvider, DownstreamRoute, IServiceDiscoveryProvider, WeightRandom> loadBalancerFactoryFunc = (serviceProvider, Route, serviceDiscoveryProvider) => new WeightRandom(serviceDiscoveryProvider.Get); Func<IServiceProvider, DownstreamRoute, IServiceDiscoveryProvider, WeightRandom> loadBalancerFactoryFunc = (serviceProvider, Route, serviceDiscoveryProvider) => new WeightRandom(serviceDiscoveryProvider.Get);
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
//services.AddIdentityServer();
//services.AddOcelot().AddNacosDiscovery(); //services.AddOcelot().AddNacosDiscovery();
services.AddOcelot(Configuration) services.AddOcelot(Configuration)
.AddNacosDiscovery() .AddNacosDiscovery()
......
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
//"SecretKey": "", //"SecretKey": "",
"ConfigUseRpc": false, "ConfigUseRpc": false,
"NamingUseRpc": false "NamingUseRpc": false
},
"Kestrel": {
"Endpoints": {
"Https": {
"Url": "https://*:9601"
},
"Http": {
"Url": "http://*:9600"
}
}
} }
//"Kestrel": {
// "Endpoints": {
// "Https": {
// "Url": "https://*:9601"
// },
// "Http": {
// "Url": "http://*:9600"
// }
// }
//}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论