From b98df034707a61fd2857dbccd5a232605076ca59 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期四, 20 十一月 2025 10:26:08 +0800
Subject: [PATCH] 标准版初始化

---
 WebApi/Gs.Toolbox/ApiCore/Common/Mvc/CustomControllerFeatureProvider.cs |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/WebApi/Gs.Toolbox/ApiCore/Common/Mvc/CustomControllerFeatureProvider.cs b/WebApi/Gs.Toolbox/ApiCore/Common/Mvc/CustomControllerFeatureProvider.cs
index 2caec77..3ff4773 100644
--- a/WebApi/Gs.Toolbox/ApiCore/Common/Mvc/CustomControllerFeatureProvider.cs
+++ b/WebApi/Gs.Toolbox/ApiCore/Common/Mvc/CustomControllerFeatureProvider.cs
@@ -66,15 +66,25 @@
                 assembly.FullName.Contains("Swashbuckle"))
                 return;
             //閫掑綊鑾峰彇controller
-            var assTemp = Assembly.Load(assembly);
-            assTemp.GetTypes().ToList().ForEach(type =>
+            try
             {
-                //濡傛灉瀹炵幇浜咺RomteService鍒欒涓烘槸涓�涓帶鍒跺櫒
-                if (!IsController(type)) return;
-                feature.Controllers.Add(type.GetTypeInfo());
-            });
-            var a = assTemp.GetReferencedAssemblies();
-            AddController(feature, a);
+                var assTemp = Assembly.Load(assembly);
+                assTemp.GetTypes().ToList().ForEach(type =>
+                {
+                    //濡傛灉瀹炵幇浜咺RomteService鍒欒涓烘槸涓�涓帶鍒跺櫒
+                    if (!IsController(type)) return;
+                    feature.Controllers.Add(type.GetTypeInfo());
+                });
+                var a = assTemp.GetReferencedAssemblies();
+                AddController(feature, a);
+            }
+            catch (Exception)
+            {
+
+                 
+            }
+           
+           
         });
     }
 

--
Gitblit v1.9.3