Example usage for org.springframework.boot.web.servlet ServletListenerRegistrationBean getSupportedTypes

List of usage examples for org.springframework.boot.web.servlet ServletListenerRegistrationBean getSupportedTypes

Introduction

In this page you can find the example usage for org.springframework.boot.web.servlet ServletListenerRegistrationBean getSupportedTypes.

Prototype

public static Set<Class<?>> getSupportedTypes() 

Source Link

Document

Return the supported types for this registration.

Usage

From source file:org.springframework.boot.web.servlet.ServletContextInitializerBeans.java

@SuppressWarnings("unchecked")
private void addAdaptableBeans(ListableBeanFactory beanFactory) {
    MultipartConfigElement multipartConfig = getMultipartConfig(beanFactory);
    addAsRegistrationBean(beanFactory, Servlet.class, new ServletRegistrationBeanAdapter(multipartConfig));
    addAsRegistrationBean(beanFactory, Filter.class, new FilterRegistrationBeanAdapter());
    for (Class<?> listenerType : ServletListenerRegistrationBean.getSupportedTypes()) {
        addAsRegistrationBean(beanFactory, EventListener.class, (Class<EventListener>) listenerType,
                new ServletListenerRegistrationBeanAdapter());
    }//from  w  w  w  .j ava2s.com
}