From a6ea79849f0142b5280f0c5d4b15ecc83f0d015a Mon Sep 17 00:00:00 2001 From: 刘磊 <1161824510@qq.com> Date: 星期六, 21 十二月 2024 09:52:27 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/HuaYiZhongHeng/BaiBuLiKu --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs index 90c4c55..c7403ba 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs @@ -19,6 +19,7 @@ using WIDESEA_Core.Core; using Swashbuckle.AspNetCore.SwaggerGen; using Microsoft.OpenApi.Models; +using WIDESEA_StorageTaskServices; var builder = WebApplication.CreateBuilder(args); @@ -109,6 +110,8 @@ } }); +builder.Services.AddHostedService<MyBackgroundService>(); + var app = builder.Build(); @@ -117,12 +120,12 @@ app.ConfigureApplication();//配置文件 app.UseApplicationSetup();//启动配置 app.UseSession(); -if (app.Environment.IsDevelopment()) -{ +//if (app.Environment.IsDevelopment()) +//{ //todo //app.UseSwaggerAuthorized(); app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEA_WMSServer.index.html")); -}//判断是否需要打开swagger +//}//判断是否需要打开swagger app.UseIpLimitMiddle(); app.UseApiLogMiddleware(); @@ -144,7 +147,6 @@ app.UseAuthentication(); app.UseAuthorization(); - app.MapControllers(); -- Gitblit v1.9.3