Created
December 1, 2010 22:19
-
-
Save rdammkoehler/724338 to your computer and use it in GitHub Desktop.
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 jerseyandguice; | |
import com.google.inject.Guice; | |
import com.google.inject.Injector; | |
import com.google.inject.servlet.GuiceServletContextListener; | |
import com.google.inject.servlet.ServletModule; | |
public class JGServletContextListener extends GuiceServletContextListener { | |
private final ServletModule customServletModule = new ServletModule() { | |
@Override | |
protected void configureServlets() { | |
serve("/jg/*").with(BogoServlet.class); | |
} | |
}; | |
@Override | |
protected Injector getInjector() { | |
return Guice.createInjector(new DependancyModule(), customServletModule); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment