chore: 优化AgileConfig配置

This commit is contained in:
2025-10-23 13:35:35 +08:00
parent e79925f402
commit 2360504491
3 changed files with 6 additions and 12 deletions

View File

@ -1,6 +1,5 @@
using KonSoft.Admin;
using KonSoft.Shared.Hosting.Gateways;
using Volo.Abp;
using Volo.Abp.Modularity;
namespace KonSoft.InternalGateway
@ -10,9 +9,6 @@ namespace KonSoft.InternalGateway
typeof(AdminHttpApiModule)
)]
public class InternalGatewayModule : AbpModule
{
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
}
}
}

View File

@ -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!;

View File

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