Silky框架旨在幫助開發(fā)者在.net平臺下,通過簡單代碼和配置快速構(gòu)建一個微服務(wù)開發(fā)框架。

您只需要通過如下簡單的代碼和配置即可構(gòu)建一個微服務(wù)應(yīng)用:

public static async" />

国产成人精品无码青草_亚洲国产美女精品久久久久∴_欧美人与鲁交大毛片免费_国产果冻豆传媒麻婆精东

15158846557 在線咨詢 在線咨詢
15158846557 在線咨詢
所在位置: 首頁 > 營銷資訊 > 網(wǎng)站運(yùn)營 > net 微服務(wù)框架有哪些?

net 微服務(wù)框架有哪些?

時間:2023-11-23 01:30:01 | 來源:網(wǎng)站運(yùn)營

時間:2023-11-23 01:30:01 來源:網(wǎng)站運(yùn)營

net 微服務(wù)框架有哪些?:Silky 微服務(wù)框架

Silky框架旨在幫助開發(fā)者在.net平臺下,通過簡單代碼和配置快速構(gòu)建一個微服務(wù)開發(fā)框架。

您只需要通過如下簡單的代碼和配置即可構(gòu)建一個微服務(wù)應(yīng)用:

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(); } }


配置文件 appsettings.yml

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開源地址:



關(guān)鍵詞:微服

74
73
25
news

版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。

為了最佳展示效果,本站不支持IE9及以下版本的瀏覽器,建議您使用谷歌Chrome瀏覽器。 點(diǎn)擊下載Chrome瀏覽器
關(guān)閉