背景说明:

      在.net core中appsetting文件中配置了很多基础项:比如session过期时间、短信配置参数等,以便在部署时快速更换基础参数值

appsetting.json文件示例

{
  "Logging": {
    "LogLevel": {
      "Default": "Warning"
    }
  },
  "ConnectionStrings": {
    "Database": "Server=127.0.0.1;Database=db_dep;user=sa;password=#;"
  },
  "Setting": {
    "session_timeout": "1800"
  },
  "AllowedHosts": "*"
}
View Code

相关文章: