Noel Yap Noel Yap - 26 days ago 6
Java Question

How to have a Guice module use another Guice module?

Let's say I have a Guice module ProdModule that I would like to depend on other GuiceModules, ProdDbModule and ProdPubSubModule. How would I implement ProdModule's configure()?

Answer

You would install your other modules

protected void configure(){
    install(new ProdDbModule());
    install(new ProdPubSubModule());
    // etc.
}