Noel Yap Noel Yap - 1 year ago 83
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.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download