14
06/19
Ocelot+Consul+.netcore高可用&动态伸缩
Ocelot 网关: publicclassStartup { publicStartup(IConfiguration configuration) { Configuration= configuration; } publicIConfigurationConfiguration{ get;} // This method gets called by the runtime. Use this method to add services to the container. publicvoidConfigureServices(IServiceCollection services) { var config =newConfigurationBuilder() .AddJsonFile("Ocelot.json",false,true) .Build(); services.AddOcelot(config).AddConsul(); servic...