xiazhengtongxue
2026-03-19 bfcd7f5b405e431a5c07fe3fa77d74c892d4e66b
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
@@ -1,5 +1,3 @@
using System.Reflection;
using System.Text;
using Autofac;
using Autofac.Core;
using Autofac.Extensions.DependencyInjection;
@@ -11,6 +9,8 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using System.Reflection;
using System.Text;
using WIDESEA_Core;
using WIDESEA_Core.Authorization;
using WIDESEA_Core.BaseServices;
@@ -20,6 +20,7 @@
using WIDESEA_Core.Helper;
//using WIDESEA_Core.HostedService;
using WIDESEA_Core.Middlewares;
using WIDESEA_TaskInfoService;
using WIDESEA_WMSServer.Filter;
var builder = WebApplication.CreateBuilder(args);
@@ -94,6 +95,7 @@
builder.Services.Replace(ServiceDescriptor.Transient<IControllerActivator, ServiceBasedControllerActivator>());
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
builder.Services.AddHostedService<WMSCruJob>();
var app = builder.Build();
@@ -108,7 +110,7 @@
app.UseSwaggerAuthorized();
app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEA_WMSServer.index.html") ?? throw new Exception("WIDESEA_WMSServer.index.html鏂囦欢"));
app.UseIpLimitMiddle();
app.UseApiLogMiddleware();
//app.UseApiLogMiddleware(); //鍏抽棴鏃ュ織
//todo
//app.UseRecordAccessLogsMiddle();