2020
10-08
10-08
.net core 静态类获取appsettings的方法
注入获取注入获取通过IConfiguration直接获取的方法官方文档里就有,可以直接看这里如:appsettings.json{"Position":{"Title":"编辑器","Name":"JoeSmith"},"MyKey":"Myappsettings.jsonValue","Logging":{"LogLevel":{"Default":"Information","Microsoft":"Warning","Lifetime":"Information"}},"AllowedHosts":"*"}可以用注入的IConfiguration,用冒号分隔的形式...
继续阅读 >