From a5019b475f8620dba3b495da983f4db9e32f7ca8 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期四, 10 七月 2025 08:18:36 +0800
Subject: [PATCH] AOI

---
 MESApplication/Startup.cs |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/MESApplication/Startup.cs b/MESApplication/Startup.cs
index 17e9bf6..50bfa25 100644
--- a/MESApplication/Startup.cs
+++ b/MESApplication/Startup.cs
@@ -1,4 +1,5 @@
-锘縰sing MES.Service.Dto.@base;
+锘縰sing System.Reflection;
+using MES.Service.Dto.@base;
 using MES.Service.util;
 using Microsoft.OpenApi.Models;
 using Newtonsoft.Json;
@@ -35,6 +36,10 @@
             c.SwaggerDoc("v1",
                 new OpenApiInfo
                     { Title = "MESApplication.Api", Version = "v1" });
+            var xmlFile =
+                $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
+            var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
+            c.IncludeXmlComments(xmlPath, true);
         });
 
         //閰嶇疆JSON.NET
@@ -68,11 +73,15 @@
         });
 
         #region 鎺ュ彛琛屽姩杩囨护鍣�
-        services.AddControllers(options => {
+
+        services.AddControllers(options =>
+        {
             options.Filters.Add(new ActionFilter());
         });
         var serviceProvider = services.BuildServiceProvider();
-        ActionFilter.LoggerError = serviceProvider.GetRequiredService<ILogger<ActionFilter>>();
+        ActionFilter.LoggerError =
+            serviceProvider.GetRequiredService<ILogger<ActionFilter>>();
+
         #endregion
     }
 
@@ -102,8 +111,7 @@
         app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
 
         //////////////////////////
-        
-        ///////////////////////////
 
+        ///////////////////////////
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3