diff --git a/CoreCms.Net.Web.WebApi/Startup.cs b/CoreCms.Net.Web.WebApi/Startup.cs index 576dad8..a85005c 100644 --- a/CoreCms.Net.Web.WebApi/Startup.cs +++ b/CoreCms.Net.Web.WebApi/Startup.cs @@ -30,8 +30,10 @@ using System.Collections.Generic; using System.Linq; using CoreCms.Net.RedisMQ.Subscribe; using CoreCms.Net.Utility.Extensions; +using CoreCms.Net.WeChat.Service.Mediator; using Essensoft.Paylink.Alipay; using Essensoft.Paylink.WeChatPay; +using MediatR; namespace CoreCms.Net.Web.WebApi { @@ -82,6 +84,9 @@ namespace CoreCms.Net.Web.WebApi // AutoMapper支持 services.AddAutoMapper(typeof(AutoMapperConfiguration)); + //MediatR(只需要注册一个,同项目或类库下就不需要注册多个) + services.AddMediatR(typeof(TextMessageEventCommand).Assembly); + //使用 SignalR services.AddSignalR();