摘要: 在.net core中有一个IWebHostEnvironment接口(在低版本中为IHostEnvironment) IWebHostEnvironment里面有一个ContentRootPath(根目录)和WebRootPath(根目录+wwwroot) 为了区别windows环境和普通路径环境 阅读全文
posted @ 2020-08-30 23:48 RookieCoderAdu 阅读(339) 评论(0) 推荐(0)
摘要: 在.net core中配置一般是存储在appsetting.json中(json形式),那么怎么从中读取数据呢 在.net core中封装了IConfiguration接口,用来获取配置中的section public static void Init(IServiceCollection serv 阅读全文
posted @ 2020-08-30 22:30 RookieCoderAdu 阅读(465) 评论(0) 推荐(0)