From 23605044918e80a6162b2c69f6a1b60824120849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=85=86=E9=91=AB?= Date: Thu, 23 Oct 2025 13:35:35 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96AgileConfig=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../KonSoft.InternalGateway/InternalGatewayModule.cs | 4 ---- microservices/KonSoft.Admin.HttpApi.Host/Program.cs | 4 ++-- .../ApplicationBuilderHelper.cs | 10 ++++------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/gateways/KonSoft.InternalGateway/InternalGatewayModule.cs b/gateways/KonSoft.InternalGateway/InternalGatewayModule.cs index e7205da..585c29a 100644 --- a/gateways/KonSoft.InternalGateway/InternalGatewayModule.cs +++ b/gateways/KonSoft.InternalGateway/InternalGatewayModule.cs @@ -1,6 +1,5 @@ using KonSoft.Admin; using KonSoft.Shared.Hosting.Gateways; -using Volo.Abp; using Volo.Abp.Modularity; namespace KonSoft.InternalGateway @@ -11,8 +10,5 @@ namespace KonSoft.InternalGateway )] public class InternalGatewayModule : AbpModule { - public override void OnApplicationInitialization(ApplicationInitializationContext context) - { - } } } diff --git a/microservices/KonSoft.Admin.HttpApi.Host/Program.cs b/microservices/KonSoft.Admin.HttpApi.Host/Program.cs index 1189def..f357a71 100644 --- a/microservices/KonSoft.Admin.HttpApi.Host/Program.cs +++ b/microservices/KonSoft.Admin.HttpApi.Host/Program.cs @@ -1,8 +1,8 @@ -using System; -using KonSoft.Admin; +using KonSoft.Admin; using KonSoft.Shared.Hosting.AspNetCore; using Microsoft.AspNetCore.Builder; using Serilog; +using System; var assemblyName = typeof(Program).Assembly.GetName().Name!; diff --git a/shared/KonSoft.Shared.Hosting.AspNetCore/ApplicationBuilderHelper.cs b/shared/KonSoft.Shared.Hosting.AspNetCore/ApplicationBuilderHelper.cs index 220fb30..8252d4a 100644 --- a/shared/KonSoft.Shared.Hosting.AspNetCore/ApplicationBuilderHelper.cs +++ b/shared/KonSoft.Shared.Hosting.AspNetCore/ApplicationBuilderHelper.cs @@ -1,5 +1,4 @@ using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Serilog; @@ -15,13 +14,12 @@ public static class ApplicationBuilderHelper where TStartupModule : IAbpModule { var builder = WebApplication.CreateBuilder(args); - builder.Configuration - .AddAgileConfig(option => - { - option.ENV = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Development"; - }); builder.Host .AddAppSettingsSecretsJson() + .UseAgileConfig(options => + { + options.ENV = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Development"; + }) .UseAutofac() .UseSerilog();