From 53142c9c632d95dd0817bf2406f56fa0f6907d40 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期一, 27 四月 2026 14:39:20 +0800
Subject: [PATCH] 1
---
WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
index 020f7d1..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,7 +35,7 @@
}); ;
builder.ConfigureApplication();
-App.ExpDateTime = DateTime.Parse("2025-05-31 00:00:00");
+//App.ExpDateTime = DateTime.Parse("2025-05-31 00:00:00");
// 2、配置服务
builder.Services.AddSingleton(new AppSettings(builder.Configuration));//注册
@@ -90,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