Compare commits
No commits in common. "10e9e5f2ac4030e7cdbf319c122dd98b05b23313" and "8135ee0f4c53a719f314b05fc0226ff6378901cb" have entirely different histories.
10e9e5f2ac
...
8135ee0f4c
|
|
@ -18,10 +18,9 @@ namespace Learn.Archives.API.Controllers
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class PublicController : Controller
|
public class PublicController : Controller
|
||||||
{
|
{
|
||||||
private readonly IHostEnvironment _environment;
|
|
||||||
public PublicController(Repository<School> baseService, IHostEnvironment environment)
|
public PublicController(Repository<School> baseService)
|
||||||
{
|
{
|
||||||
_environment = environment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -52,29 +51,5 @@ namespace Learn.Archives.API.Controllers
|
||||||
return Enum.GetValues(AppCommon.EnumType[type]).Cast<object>()
|
return Enum.GetValues(AppCommon.EnumType[type]).Cast<object>()
|
||||||
.ToDictionary(s => (int)s, s => s.ToString());
|
.ToDictionary(s => (int)s, s => s.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取当前环境变量,配置文件
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpGet]
|
|
||||||
public IActionResult NewENV()
|
|
||||||
{
|
|
||||||
var envName = _environment.EnvironmentName;
|
|
||||||
var env = "无配置";
|
|
||||||
if (_environment.IsDevelopment())
|
|
||||||
env = "开发环境";
|
|
||||||
else if (_environment.IsStaging())
|
|
||||||
env = "测试/预发布环境";
|
|
||||||
else if (_environment.IsProduction())
|
|
||||||
env = "生产环境";
|
|
||||||
|
|
||||||
return Ok(new
|
|
||||||
{
|
|
||||||
envName,
|
|
||||||
env,
|
|
||||||
AppCommon.Config
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
},
|
},
|
||||||
"DB": {
|
"DB": {
|
||||||
"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.archives;CharSet=utf8mb4;pooling=true;SslMode=None",
|
"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.archives;CharSet=utf8mb4;pooling=true;SslMode=None",
|
||||||
|
|
||||||
"SqlType": "MySql",
|
"SqlType": "MySql",
|
||||||
"UpdateTable": false
|
"UpdateTable": false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
"ConnectionString": "redis-service.infra.svc.cluster.local:6379,password=tBHjtmXVRnEywYUfJjQp,defaultDatabase=5"
|
"ConnectionString": "redis-service.infra.svc.cluster.local:6379,password=tBHjtmXVRnEywYUfJjQp,defaultDatabase=5"
|
||||||
},
|
},
|
||||||
"DB": {
|
"DB": {
|
||||||
"ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Database=learn.archives;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;",
|
"ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Port=3306;Database=learn.archives;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;",
|
||||||
"SqlType": "MySql",
|
"SqlType": "MySql",
|
||||||
"UpdateTable": false
|
"UpdateTable": false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,9 @@
|
||||||
"ConnectionString": "127.0.0.1:6379,password=Woshiren123,defaultDatabase=10"
|
"ConnectionString": "127.0.0.1:6379,password=Woshiren123,defaultDatabase=10"
|
||||||
},
|
},
|
||||||
"DB": {
|
"DB": {
|
||||||
"ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Database=learn.archives;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;",
|
"ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Port=3306;Database=learn.archives;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;",
|
||||||
"SqlType": "MySql",
|
"SqlType": "MySql",
|
||||||
"UpdateTable": false
|
"UpdateTable": true
|
||||||
},
|
},
|
||||||
"AuthKey": {
|
"AuthKey": {
|
||||||
"Secret": "9FAB7AC7-F1DB-4C56-B84F-044055A34AF2",
|
"Secret": "9FAB7AC7-F1DB-4C56-B84F-044055A34AF2",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue