From 05fbf30c71ad29e60b871602a4a2144736276633 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Sat, 18 Jun 2022 13:48:57 +0800 Subject: [PATCH] Initialize rebus event bus before use rebus --- .../Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs index e5c045f316..351f575f46 100644 --- a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs @@ -41,11 +41,11 @@ public class AbpEventBusRebusModule : AbpModule public override void OnApplicationInitialization(ApplicationInitializationContext context) { - context.ServiceProvider.UseRebus(); - context .ServiceProvider .GetRequiredService() .Initialize(); + + context.ServiceProvider.UseRebus(); } }