From b0e0f7dd702df1f734ca0c3ed5ae36e73aa80b38 Mon Sep 17 00:00:00 2001 From: hyh Date: Fri, 13 Jun 2025 11:42:37 +0800 Subject: [PATCH] =?UTF-8?q?UseSwagger=20=E5=8E=BB=E9=99=A4=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreAgent.API/Startup.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CoreAgent.API/Startup.cs b/CoreAgent.API/Startup.cs index 9b6a873..87e7a25 100644 --- a/CoreAgent.API/Startup.cs +++ b/CoreAgent.API/Startup.cs @@ -116,11 +116,13 @@ namespace CoreAgent.API public static void ConfigureSwagger(this WebApplication app) { - if (app.Environment.IsDevelopment()) - { - app.UseSwagger(); - app.UseSwaggerUI(); - } + //if (app.Environment.IsDevelopment()) + //{ + // app.UseSwagger(); + // app.UseSwaggerUI(); + //} + app.UseSwagger(); + app.UseSwaggerUI(); } // 新增:创建Startup实例的扩展方法