config: use direct MySQL connection string
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"DbConnection": {
|
||||
"ConnectionConfigs": [
|
||||
{
|
||||
"DbType": "MySqlConnector",
|
||||
"ConnectionString": "Server=127.0.0.1;Port=3306;Database=evergreen_health;User ID=root;Password=CHANGE_ME;CharSet=utf8mb4;SslMode=None;Pooling=true;Connection Timeout=30"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -10,12 +10,6 @@ public class WebComponent : IWebComponent
|
||||
{
|
||||
public void Load(WebApplicationBuilder builder, ComponentContext componentContext)
|
||||
{
|
||||
// 本机数据库配置。该文件已加入 .gitignore,仅用于保存真实连接信息。
|
||||
builder.Configuration.AddJsonFile(
|
||||
"Configuration/Database.local.json",
|
||||
optional: true,
|
||||
reloadOnChange: true);
|
||||
|
||||
// 设置日志过滤
|
||||
builder.Logging.AddFilter((provider, category, logLevel) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user