How to unbind @Singleton #12936
-
I have a monolithic application with a huge ammount of classes annotated with |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I found part of the answer, implicit binding needs to be disabled. But now I get errors like
I can't replace the routes using the |
Beta Was this translation helpful? Give feedback.
-
I copied source of the BuiltinModule module, replace the call to the |
Beta Was this translation helpful? Give feedback.
I copied source of the BuiltinModule module, replace the call to the
RoutesProvider.bindingsFromConfiguration
method withFakeRouterProvider.bindingStub
, which returns an empty router, disabled the original module in the configuration and enabled patched one. I don’t know if this is right or if it can’t be done better, but it works.