diff --git a/MicoService.Demo/Program.cs b/MicoService.Demo/Program.cs index fe86fb6..e639217 100644 --- a/MicoService.Demo/Program.cs +++ b/MicoService.Demo/Program.cs @@ -1,4 +1,4 @@ - + using Nacos.AspNetCore.V2; using Nacos.V2.DependencyInjection; @@ -12,11 +12,11 @@ namespace MicoService.Demo #region Nacos - // Nacos + // 配置 Nacos 配置中心 builder.Host.UseNacosConfig("nacos"); builder.Services.AddNacosV2Config(builder.Configuration); - // Nacos עᷢ + // 配置 Nacos 注册发现 builder.Services.AddNacosAspNet(builder.Configuration); builder.Services.AddNacosV2Naming(builder.Configuration); #endregion diff --git a/MicoService.Demo2/Controllers/UserController.cs b/MicoService.Demo2/Controllers/UserController.cs index 94c5db9..9778b80 100644 --- a/MicoService.Demo2/Controllers/UserController.cs +++ b/MicoService.Demo2/Controllers/UserController.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; namespace MicoService.Demo2.Controllers { @@ -13,7 +13,7 @@ namespace MicoService.Demo2.Controllers } private readonly IConfiguration _configuration; /// - /// ʾȡ Nacos + /// 演示:读取 Nacos 配置中心配置 /// /// /// diff --git a/MicoService.Demo2/Program.cs b/MicoService.Demo2/Program.cs index 7745c94..ffc9230 100644 --- a/MicoService.Demo2/Program.cs +++ b/MicoService.Demo2/Program.cs @@ -1,4 +1,4 @@ - + using Nacos.AspNetCore.V2; using Nacos.V2.DependencyInjection; @@ -9,13 +9,13 @@ namespace MicoService.Demo2 public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); - + #region Nacos - // Nacos + // 配置 Nacos 配置中心 builder.Host.UseNacosConfig("nacos"); builder.Services.AddNacosV2Config(builder.Configuration); - // Nacos עᷢ + // 配置 Nacos 注册发现 builder.Services.AddNacosAspNet(builder.Configuration); builder.Services.AddNacosV2Naming(builder.Configuration); #endregion