From cde56aae50adc11ff8db84e424d873843c566bfd Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期一, 24 二月 2025 23:40:41 +0800 Subject: [PATCH] 优化WCS移库逻辑 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" index 80e6a5f..d6c4c0f 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" @@ -34,6 +34,7 @@ }); ; builder.ConfigureApplication(); +App.ExpDateTime = DateTime.Parse("2025-06-30 00:00:00"); // 2、配置服务 builder.Services.AddSingleton(new AppSettings(builder.Configuration));//注册 @@ -96,14 +97,16 @@ app.UseMiniProfiler();//性能分析器 app.ConfigureApplication();//配置文件 app.UseApplicationSetup();//启动配置 + +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")); + app.UseSwaggerAuthorized(); }//判断是否需要打开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