From bc1b9b0ffe981c6661d6815f9f8eaaf39734bb78 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 25 Feb 2020 18:38:37 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat:=20=E5=81=A5=E5=BA=B7=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=BA=93=E9=A9=B1?= =?UTF-8?q?=E5=8A=A8=E6=9C=AA=E5=BC=95=E7=94=A8=E6=97=B6=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=8A=9E=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/Bootstrap.Admin/HealthChecks/DBHealthCheck.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/admin/Bootstrap.Admin/HealthChecks/DBHealthCheck.cs b/src/admin/Bootstrap.Admin/HealthChecks/DBHealthCheck.cs index 6c80ff85..61c442a6 100644 --- a/src/admin/Bootstrap.Admin/HealthChecks/DBHealthCheck.cs +++ b/src/admin/Bootstrap.Admin/HealthChecks/DBHealthCheck.cs @@ -102,6 +102,8 @@ namespace Bootstrap.Admin.HealthChecks { data.Add("Exception", error.Message); + if (error.Message.Contains("Could not load", StringComparison.OrdinalIgnoreCase)) data.Add("解决办法", "Nuget 引用相对应 dll"); + // UNDONE: Json 序列化循环引用导致异常 NET 5.0 修复此问题 // 目前使用 new Exception() 临时解决 return Task.FromResult(HealthCheckResult.Unhealthy("Error", new Exception(error.Message), data)); From d2e22eb85696174bc6be5db1585036270b233404 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 25 Feb 2020 23:12:59 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=81=A5=E5=BA=B7?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=20api=20=E6=8E=A5=E5=8F=A3=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E5=8C=BF=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/Bootstrap.Admin/Controllers/Api/HealthsController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/HealthsController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/HealthsController.cs index 1ef073aa..05ef1440 100644 --- a/src/admin/Bootstrap.Admin/Controllers/Api/HealthsController.cs +++ b/src/admin/Bootstrap.Admin/Controllers/Api/HealthsController.cs @@ -10,7 +10,7 @@ namespace Bootstrap.Admin.Controllers.Api /// 健康检查控制器 /// [Route("api/[controller]")] - [Authorize] + [AllowAnonymous] [ApiController] public class HealthsController : ControllerBase { From 045e663ca6c6774ff6bae556fe48ea4c49887f93 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 25 Feb 2020 23:13:34 +0800 Subject: [PATCH 3/7] =?UTF-8?q?refactor:=20=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E5=81=A5=E5=BA=B7=E6=A3=80=E6=9F=A5=E5=A2=9E=E5=8A=A0=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E8=A7=A3=E5=86=B3=E5=8A=9E=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/Bootstrap.Admin/HealthChecks/DBHealthCheck.cs | 2 +- src/admin/Bootstrap.Admin/wwwroot/html/Healths-UI.html | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/admin/Bootstrap.Admin/HealthChecks/DBHealthCheck.cs b/src/admin/Bootstrap.Admin/HealthChecks/DBHealthCheck.cs index 61c442a6..989df12a 100644 --- a/src/admin/Bootstrap.Admin/HealthChecks/DBHealthCheck.cs +++ b/src/admin/Bootstrap.Admin/HealthChecks/DBHealthCheck.cs @@ -102,7 +102,7 @@ namespace Bootstrap.Admin.HealthChecks { data.Add("Exception", error.Message); - if (error.Message.Contains("Could not load", StringComparison.OrdinalIgnoreCase)) data.Add("解决办法", "Nuget 引用相对应 dll"); + if (error.Message.Contains("Could not load", StringComparison.OrdinalIgnoreCase)) data.Add("解决办法", "Nuget 引用相对应的数据库驱动 dll"); // UNDONE: Json 序列化循环引用导致异常 NET 5.0 修复此问题 // 目前使用 new Exception() 临时解决 diff --git a/src/admin/Bootstrap.Admin/wwwroot/html/Healths-UI.html b/src/admin/Bootstrap.Admin/wwwroot/html/Healths-UI.html index 2d0ce418..52680cff 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/html/Healths-UI.html +++ b/src/admin/Bootstrap.Admin/wwwroot/html/Healths-UI.html @@ -18,6 +18,7 @@