加载配置文件优化

This commit is contained in:
“hsc”
2026-07-30 13:24:12 +08:00
parent 252c70ef05
commit 0e9f65ea21
3 changed files with 11 additions and 53 deletions

View File

@@ -69,6 +69,10 @@ namespace MainModule.ViewModels
string json = System.IO.File.ReadAllText(filePath);
Newtonsoft.Json.JsonConvert.PopulateObject(json, _systemConfig);
}
else
{
_systemConfig = new SystemConfig();
}
}
//容器解析顺序不要改变!!!
_scopedContext = _scope.Resolve<ScopedContext>();