使用多个 AbstractGinModule 实例化注入器
在 google Guice 中,我可以使用函数 createInjector
创建基于多个模块的注入器。
因为我在GoogleGin中使用GWT.create来实例化注入器,所以是否可以基于多个AbstractGinModule创建一个Ginjector。
如果不能,您如何组织代码以避免所有绑定都在同一个 Module 中?
In google Guice, I can create an injector based on multiple module with the function createInjector
.
Because I use GWT.create
to instanciate the injector in GoogleGin, is it possible to create a Ginjector based on multiple AbstractGinModule
.
If we can't, how do you organize your code to avoid having all your binding in the same Module ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用以下代码创建使用多个模块的注入器:
I use the following code to create injector which is using multiple modules: