config: use direct MySQL connection string

This commit is contained in:
fuenmao
2026-09-21 14:20:36 +08:00
parent 8553df5dd2
commit b1a311cf84
5 changed files with 5 additions and 23 deletions
@@ -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"
}
]
}
}
-6
View File
@@ -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) =>
{