Noel Yap Noel Yap - 10 months ago 60
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 Source

You would install your other modules

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