chore: 优化AgileConfig配置
This commit is contained in:
@ -1,6 +1,5 @@
|
|||||||
using KonSoft.Admin;
|
using KonSoft.Admin;
|
||||||
using KonSoft.Shared.Hosting.Gateways;
|
using KonSoft.Shared.Hosting.Gateways;
|
||||||
using Volo.Abp;
|
|
||||||
using Volo.Abp.Modularity;
|
using Volo.Abp.Modularity;
|
||||||
|
|
||||||
namespace KonSoft.InternalGateway
|
namespace KonSoft.InternalGateway
|
||||||
@ -11,8 +10,5 @@ namespace KonSoft.InternalGateway
|
|||||||
)]
|
)]
|
||||||
public class InternalGatewayModule : AbpModule
|
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 KonSoft.Shared.Hosting.AspNetCore;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
using System;
|
||||||
|
|
||||||
var assemblyName = typeof(Program).Assembly.GetName().Name!;
|
var assemblyName = typeof(Program).Assembly.GetName().Name!;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
@ -15,13 +14,12 @@ public static class ApplicationBuilderHelper
|
|||||||
where TStartupModule : IAbpModule
|
where TStartupModule : IAbpModule
|
||||||
{
|
{
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
builder.Configuration
|
|
||||||
.AddAgileConfig(option =>
|
|
||||||
{
|
|
||||||
option.ENV = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Development";
|
|
||||||
});
|
|
||||||
builder.Host
|
builder.Host
|
||||||
.AddAppSettingsSecretsJson()
|
.AddAppSettingsSecretsJson()
|
||||||
|
.UseAgileConfig(options =>
|
||||||
|
{
|
||||||
|
options.ENV = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Development";
|
||||||
|
})
|
||||||
.UseAutofac()
|
.UseAutofac()
|
||||||
.UseSerilog();
|
.UseSerilog();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user