Created
February 1, 2011 13:52
-
-
Save lucascs/805880 to your computer and use it in GitHub Desktop.
overriding guice's module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package my.apps.package; | |
public class CustomProvider extends GuiceProvider { | |
static class CustomModule extends AbstractModule { | |
private final Module module; | |
CustomModule(Module module) { | |
this.module = module; | |
} | |
@Override | |
protected void configure() { | |
install(this.module); | |
// configurations | |
} | |
} | |
@Override | |
protected Module customModule() { | |
return new CustomModule(super.customModule()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<context-param> | |
<param-name>br.com.caelum.vraptor.provider</param-name> | |
<param-value>my.apps.package.CustomProvider</param-value> | |
</context-param> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment