4
每一個! 我在我的GWT應用程序中有一個編譯問題,它分爲3個模塊: App-core:包含沒有入口點的主類, App-A和App-B:從App-core繼承,幷包含在每個子模塊中都有具有入口點的特定類。GWTP應用程序中的GIN綁定問題
我使用的是GIN每個模塊中注入的類的實例:
在應用核:
public interface App-coreGinjector extends Ginjector {
EventBus getEventBus();
Provider<LoginPagePresenter> getLoginPagePresenter();
...
}
App-coreModule extends AbstractPresenterModule {
protected void configureCore() {
install(new DefaultModule(App-corePlaceManager.class));
bindConstant().annotatedWith(DefaultPlace.class).to(LoginPagePresenter.NAME_TOKEN);
...
bind(AuthenticationManager.class).to(AuthenticationManagerImpl.class);
bindPresenter(LoginPagePresenter.class, LoginPagePresenter.MyView.class,
LoginPageView.class, LoginPagePresenter.MyProxy.class);
}
在app-A
:
@GinModules({ App-AModule.class })
public interface App-AGinjector extends App-coreGinjector {
MyApp-AScreen getMyApp-AScreen();
...
}
public class App-AModule extends App-coreModule {
@Override
protected void configure() {
configureCore();
...
//Here we bind the App-A classes inheriting from App-core classes
bind(App-coreScreenManager.class).to(App-AcreenManager.class).in(Singleton.class);
...
//Here we bind the specific App=A classes
}
和我們做同樣的App-B中的東西
maven編譯對於App-A來說是成功的,但是對於App-B卻是失敗的, essage:
[ERROR] Errors in 'C:\workspace\App-core\client\gin\App-coreGinjectorImpl.java'
[ERROR] Line 790: Rebind result 'com.gwtplatform.mvp.client.proxy.PlaceManager' must be a class
[ERROR] Line 818: Rebind result 'lu.sfeir.grh.client.authentication.AuthenticationManager' must be a class
[ERROR] Line 1047: Rebind result 'lu.sfeir.grh.client.login.LoginPagePresenter.MyView' must be a class
[ERROR] Line 2359: Rebind result 'com.google.gwt.event.shared.EventBus' cannot be abstract
[ERROR] Cannot proceed due to previous errors
那麼怪異的一部分INT這一切的是,這個錯誤來自這兩個子模塊之間共享的模塊,女巫是LoginPagePresenter和AuthentificationManager的結合,但我們只是在一本彙編錯誤子模塊。 所以如果有人有這個國王的問題,我等待他的寶貴幫助^^
啊!如果你想要一些精確度,不要害羞!
的幾個問題(這是無需強硬所有代碼來看看,GWTP有很多文件,它打破了這一切),你是什麼導入的EventBus,它是com.google.gwt.event.shared.EventBus?另外你的PlaceManager實現應該繼承PlaceManagerImpl的子類。如果你能捆綁代碼,我應該能夠爲你解決這個問題,但是很多問題可能會出錯,並且知道從哪裏開始尋找什麼是不容易的。我採用的方法是簡化,首先刪除除EventBus和PlaceManager之外的所有內容,然後查看是否可以獲取 – 2012-07-05 11:58:07