时间:2023-11-23 01:30:01 | 来源:网站运营
时间:2023-11-23 01:30:01 来源:网站运营
net 微服务框架有哪些?:Silky 微服务框架 public static async Task Main(string[] args) { await CreateHostBuilder(args).Build().RunAsync(); } private static IHostBuilder CreateHostBuilder(string[] args) { var hostBuilder = Host .CreateDefaultBuilder(args) .ConfigureSilkyGeneralHostDefaults() .UseSerilogDefault() ; if (hostBuilder.IsEnvironment("Apollo")) { hostBuilder.AddApollo(); } return hostBuilder; } public class NormHostConfigureService : IConfigureService { public void ConfigureServices(IServiceCollection services, IConfiguration configuration) { services.AddDatabaseAccessor(options => { options.AddDbPool<DemoDbContext>(); }, "NormHostDemo"); services.AddSilkySkyApm(); services.AddMessagePackCodec(); } }
rpc: host: 0.0.0.0 port: 2203 token: ypjdYOzNd4FwENJiEARMLWwK0v7QUHPWregistrycenter: connectionStrings: 127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183;127.0.0.1:2184,127.0.0.1:2185,127.0.0.1:2186 registryCenterType: ZookeeperdistributedCache: redis: isEnabled: true configuration: 127.0.0.1:6379,defaultDatabase=0connectionStrings: demoDbContext: "server=127.0.0.1;port=3306;database=test;uid=root;pwd=qwe!P4ss;"governance: executionTimeout: -1
开源地址:关键词:微服