Class ServletListenerRegistrationBean<T extends EventListener>

  • Type Parameters:
    T - the type of listener
    All Implemented Interfaces:
    ServletContextInitializer, org.springframework.core.Ordered

    public class ServletListenerRegistrationBean<T extends EventListener>
    extends RegistrationBean
    A ServletContextInitializer to register EventListeners in a Servlet 3.0+ container. Similar to the registration features provided by ServletContext but with a Spring Bean friendly design. This bean can be used to register the following types of listener:
    • ServletContextAttributeListener
    • ServletRequestListener
    • ServletRequestAttributeListener
    • HttpSessionAttributeListener
    • HttpSessionListener
    • ServletContextListener
    Since:
    1.4.0