Tomas Kormanak
08/17/2022, 8:52 AMDependencyLoopException
We have a loop in dependencies which I think is alright in our case. We use construction injection (no DiAware interface). I was hoping that using a provider can solve it, but it seems not. Any ideas?
bind<EventBus>
╔╩>bind<Set<out EventHandler<in Event>>>
║ ╚>bind<NotificationService>
║ ╚>bind<EventBus>
╚══════╝
class LocalEventdBus: EventBus (
handlerProvider: () -> Set<EventHandler<Event>>,
) {...}
bindSingleton<EventBus> { LocalEventBus(provider()) }
romainbsl
08/19/2022, 11:29 AMbindSingleton<EventBus> { LocalEventBus(instance()) }