From c7082f9c389230a989b1fa63862f6aa6e720990c Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期五, 28 二月 2025 10:41:13 +0800 Subject: [PATCH] PP仓出库MES,AGV对接流程 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" index d6f884a..dcb4c5a 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" @@ -35,6 +35,7 @@ }); ; builder.ConfigureApplication(); +App.ExpDateTime = DateTime.Parse("2025-03-31 00:00:00"); // 2、配置服务 builder.Services.AddSingleton(new AppSettings(builder.Configuration));//注册 @@ -103,13 +104,13 @@ app.UseAllServicesMiddle(builder.Services); app.UseSession(); -//if (app.Environment.IsDevelopment()) +if (app.Environment.IsProduction()) { //todo app.UseSwaggerAuthorized(); - app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEA_WMSServer.index.html") ?? throw new Exception("WIDESEA_WMSServer.index.html文件")); + }//判断是否需要打开swagger - +app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEA_WMSServer.index.html") ?? throw new Exception("WIDESEA_WMSServer.index.html文件")); app.UseIpLimitMiddle(); app.UseApiLogMiddleware(); //todo -- Gitblit v1.9.3