Gwt 将喷油器与多个模块实例化
在GoogleGuice中,我可以使用函数Gwt 将喷油器与多个模块实例化,gwt,guice,gwt-gin,Gwt,Guice,Gwt Gin,在GoogleGuice中,我可以使用函数createInjector创建基于多个模块的注入器 因为我使用了GWT.create在GoogleGin中实例化注射器,所以可以基于多个AbstractGinModule创建一个Ginjector吗 如果我们不能,您如何组织代码以避免所有绑定都在同一个模块中?我使用以下代码创建使用多个模块的注入器: @GinModules({ ClientDispatchModule.class, MyClientModule.class }) public inte
createInjector
创建基于多个模块的注入器
因为我使用了GWT.create
在GoogleGin中实例化注射器,所以可以基于多个AbstractGinModule
创建一个Ginjector吗
如果我们不能,您如何组织代码以避免所有绑定都在同一个模块中?我使用以下代码创建使用多个模块的注入器:
@GinModules({ ClientDispatchModule.class, MyClientModule.class })
public interface MyAppGinjector extends Ginjector {
AppPresenter getAppPresenter();
PlaceManager getPlaceManager();
EventBus getEventBus();
}