我剛剛開始玩Guice,我可以想到的一個用例是,在測試中我只想覆蓋單個綁定。我想我想使用剩餘的生產級綁定來確保一切安裝正確並避免重複。 所以,想象一下,我有以下模塊 public class ProductionModule implements Module {
public void configure(Binder binder) {
binder.bind(Inter
我有一個Wicket窗體的頁面,表單需要合作者完成其工作。合作者注入(爲此我使用的吉斯),看起來是這樣的: 我不喜歡這個想法,RegistrationService注入RegistrationPage時,它只是需要它的RegistrationForm。我可以改變RegistrationForm接收RegistrationService: public RegistrationForm(Reg