From 844c7c3ce2c39139490a6ecb0f35170f6cade290 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期二, 28 四月 2026 16:31:54 +0800
Subject: [PATCH] 1

---
 WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs |   35 ++++++++++++++++++++---------------
 1 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
index 36b73d7..4e61f7d 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
@@ -1,24 +1,25 @@
-using WIDESEA_Core.Helper;
-using WIDESEA_Core.Extensions;
-using WIDESEA_Core.Middlewares;
-using System.Reflection;
-using WIDESEA_Core.Filter;
+using Autofac;
+using Autofac.Core;
+using Autofac.Extensions.DependencyInjection;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Mvc.Controllers;
+using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
+using Microsoft.Extensions.DependencyInjection.Extensions;
+using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
 using Newtonsoft.Json.Serialization;
-using Newtonsoft.Json;
+using System.Reflection;
 using System.Text;
-using Microsoft.AspNetCore.Mvc.Controllers;
-using Microsoft.Extensions.DependencyInjection.Extensions;
-using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
 using WIDESEA_Core;
-using WIDESEA_Core.BaseServices;
-using Autofac.Extensions.DependencyInjection;
-using Autofac;
-using WIDESEA_WMSServer.Filter;
 using WIDESEA_Core.Authorization;
+using WIDESEA_Core.BaseServices;
 using WIDESEA_Core.Core;
-using Autofac.Core;
-using Microsoft.AspNetCore.Builder;
+using WIDESEA_Core.Extensions;
+using WIDESEA_Core.Filter;
+using WIDESEA_Core.Helper;
+using WIDESEA_Core.Middlewares;
+using WIDESEA_Model;
+using WIDESEA_WMSServer.Filter;
 
 var builder = WebApplication.CreateBuilder(args);
 
@@ -34,6 +35,7 @@
 }); ;
 builder.ConfigureApplication();
 
+//App.ExpDateTime = DateTime.Parse("2025-05-31 00:00:00");
 
 // 2、配置服务
 builder.Services.AddSingleton(new AppSettings(builder.Configuration));//注册
@@ -89,9 +91,12 @@
 builder.Services.Replace(ServiceDescriptor.Transient<IControllerActivator, ServiceBasedControllerActivator>());
 Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
 
+builder.Services.AddSignalR();
 
 var app = builder.Build();
 
+app.MapHub<WMSNoticeHub>("/wmsNoticeHub"); // 路由
+
 // 3、配置中间件
 app.UseMiniProfiler();//性能分析器
 app.ConfigureApplication();//配置文件

--
Gitblit v1.9.3