You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
613 B
C#
21 lines
613 B
C#
5 months ago
|
using Microsoft.Extensions.Configuration;
|
||
|
using Microsoft.Extensions.Configuration.Json;
|
||
|
|
||
|
namespace DS.WMS.PrintApi.Utils
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 配置信息
|
||
|
/// </summary>
|
||
|
public class AppSetting
|
||
|
{
|
||
|
public static IConfiguration Configuration { get; set; }
|
||
|
|
||
|
static AppSetting()
|
||
|
{
|
||
|
//ReloadOnChange = true 当appsettings.json被修改时重新加载
|
||
|
Configuration = new ConfigurationBuilder()
|
||
|
.Add(new JsonConfigurationSource { Path = "appsettings.json", ReloadOnChange = true })
|
||
|
.Build();
|
||
|
}
|
||
|
}
|
||
|
}
|