public abstract class GuiceServletContextListener
extends java.lang.Object
implements javax.servlet.ServletContextListener
GuiceServletContextListener
class as a logical place to create and configure your injector. This will ensure the injector
is created when the web application is deployed.Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
INJECTOR_NAME |
Constructor and Description |
---|
GuiceServletContextListener() |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent) |
void |
contextInitialized(javax.servlet.ServletContextEvent servletContextEvent) |
protected abstract Injector |
getInjector()
Override this method to create (or otherwise obtain a reference to) your
injector.
|
public void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
contextInitialized
in interface javax.servlet.ServletContextListener
public void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
contextDestroyed
in interface javax.servlet.ServletContextListener
protected abstract Injector getInjector()