feat 增加配置中心支持
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.Modularity;
|
||||
|
||||
namespace KonSoft.Shared.Hosting.AspNetCore;
|
||||
@ -13,6 +15,11 @@ 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()
|
||||
.UseAutofac()
|
||||
|
||||
Reference in New Issue
Block a user