chore: 优化AgileConfig配置
This commit is contained in:
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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!;
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user