From 5117927e5e72052a75e6c3398109a57b0b6d159d Mon Sep 17 00:00:00 2001 From: luolan Date: Wed, 16 Jul 2025 22:25:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=81=A5=E5=BA=B7=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=9B=B8=E5=85=B3=E5=8C=85=E5=B9=B6=E9=85=8D=E7=BD=AE?= =?UTF-8?q?NpgSql=E5=81=A5=E5=BA=B7=E6=A3=80=E6=9F=A5=E5=92=8CUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGSS/AGSS.csproj | 4 ++++ AGSS/Program.cs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AGSS/AGSS.csproj b/AGSS/AGSS.csproj index 345d158..493a13b 100644 --- a/AGSS/AGSS.csproj +++ b/AGSS/AGSS.csproj @@ -10,6 +10,10 @@ + + + + diff --git a/AGSS/Program.cs b/AGSS/Program.cs index b9c11e9..d92591a 100644 --- a/AGSS/Program.cs +++ b/AGSS/Program.cs @@ -66,7 +66,8 @@ builder.Services.Configure(options => { options.TokenValidationParameters.RoleClaimType = ClaimTypes.Role; }); - +builder.Services.AddHealthChecks().AddNpgSql(builder.Configuration.GetConnectionString("DBContext")); +builder.Services.AddHealthChecksUI(); builder.Services.Configure(builder.Configuration.GetSection("JWT")); builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)