.netcore 读取配置信息
时间:2021-01-14 11:01:03
收藏:0
阅读:0
1.将配置信息写在appsetting.json里面
2.创建一个类,包含配置文件的属性
public class AppSettingModel { public string CC_URL { get; set; } }
3.startup里面,将配置文件和类绑定
4.使用
评论(0)