NETCORE - 读取 appsettings.json 配置数据
环境 : net6 webapi
1. 配置appsettings.json数据
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "authConfig": { "Authority": "http://localhost:8092", "isHttps": false, }, "TempFiles": "TempFiles/", "AllowedHosts": "*" }
2. 创建配置类 SettingJson.cs
public class SettingJson { public string TempFiles { get; set; } }
end
标签:读取,NETCORE,appsettings,配置,json,TempFiles From: https://www.cnblogs.com/1285026182YUAN/p/17616942.html