From 83a92ab39111b0bdc1fd48effa14f0136d1f7377 Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Sat, 5 Apr 2025 02:55:52 +0200 Subject: [PATCH] declare ReactionListener in Koin --- .../eventDemo/configuration/business/ConfigureGameListener.kt | 2 +- .../eventDemo/configuration/injection/ConfigureDIBusiness.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/eventDemo/configuration/business/ConfigureGameListener.kt b/src/main/kotlin/eventDemo/configuration/business/ConfigureGameListener.kt index 6b2d5be..467ff5a 100644 --- a/src/main/kotlin/eventDemo/configuration/business/ConfigureGameListener.kt +++ b/src/main/kotlin/eventDemo/configuration/business/ConfigureGameListener.kt @@ -6,7 +6,7 @@ import eventDemo.business.event.projection.projectionListener.ReactionListener import org.koin.core.Koin fun Koin.configureGameListener() { - ReactionListener(get()) + get() .subscribeToBus(get()) get() diff --git a/src/main/kotlin/eventDemo/configuration/injection/ConfigureDIBusiness.kt b/src/main/kotlin/eventDemo/configuration/injection/ConfigureDIBusiness.kt index e343094..c41885b 100644 --- a/src/main/kotlin/eventDemo/configuration/injection/ConfigureDIBusiness.kt +++ b/src/main/kotlin/eventDemo/configuration/injection/ConfigureDIBusiness.kt @@ -4,6 +4,7 @@ import eventDemo.business.command.GameCommandActionRunner import eventDemo.business.command.GameCommandHandler import eventDemo.business.event.GameEventHandler import eventDemo.business.event.projection.projectionListener.PlayerNotificationListener +import eventDemo.business.event.projection.projectionListener.ReactionListener import org.koin.core.module.Module import org.koin.core.module.dsl.singleOf @@ -14,4 +15,5 @@ fun Module.configureDIBusiness() { singleOf(::GameEventHandler) singleOf(::GameCommandActionRunner) singleOf(::PlayerNotificationListener) + singleOf(::ReactionListener) }