mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-04 00:35:47 +08:00
配置文件热重载功能
This commit is contained in:
@@ -16,14 +16,14 @@ namespace Yi.Framework.WebCore.BuilderExtend
|
||||
string[] myJsonFile = new string[] { "appsettings.json", "Config/configuration.json" };
|
||||
foreach (var item in myJsonFile)
|
||||
{
|
||||
builder.AddJsonFile(item, optional: true, reloadOnChange: false);
|
||||
builder.AddJsonFile(item, optional: true, reloadOnChange: true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in JsonFile)
|
||||
{
|
||||
builder.AddJsonFile(item, optional: true, reloadOnChange: false);
|
||||
builder.AddJsonFile(item, optional: true, reloadOnChange: true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user