chore: 优化AgileConfig配置
This commit is contained in:
@ -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