Skip to content

Instantly share code, notes, and snippets.

@lucascs
Created February 1, 2011 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucascs/805880 to your computer and use it in GitHub Desktop.
Save lucascs/805880 to your computer and use it in GitHub Desktop.
overriding guice's module
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());
}
}
<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