修复接口未初始化MediatR导致微信消息推送失败的问题。

This commit is contained in:
JianWeie
2021-08-24 21:40:24 +08:00
parent d3aa03926a
commit 11a017e566
+5
View File
@@ -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();