Class FilterRegistrationBean<T extends Filter>
java.lang.Object
org.springframework.boot.web.servlet.RegistrationBean
org.springframework.boot.web.servlet.DynamicRegistrationBean<FilterRegistration.Dynamic>
org.springframework.boot.web.servlet.AbstractFilterRegistrationBean<T>
org.springframework.boot.web.servlet.FilterRegistrationBean<T>
- Type Parameters:
- T- the type of- Filterto register
- All Implemented Interfaces:
- Aware,- BeanNameAware,- ServletContextInitializer,- Ordered
A 
ServletContextInitializer to register Filters in a Servlet 3.0+
 container. Similar to the registration
 features provided by ServletContext but with a Spring Bean friendly design.
 
 The Filter must be specified before calling
 RegistrationBean.onStartup(ServletContext). Registrations can be associated with
 URL patterns and/or servlets (either by name or through a ServletRegistrationBeans). When
 no URL pattern or servlets are specified the filter will be associated to '/*'. The
 filter name will be deduced if not specified.
- Since:
- 1.4.0
- Author:
- Phillip Webb
- See Also:
- 
Field SummaryFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a newFilterRegistrationBeaninstance.FilterRegistrationBean(T filter, ServletRegistrationBean<?>... servletRegistrationBeans) Create a newFilterRegistrationBeaninstance to be registered with the specifiedServletRegistrationBeans.
- 
Method SummaryMethods inherited from class org.springframework.boot.web.servlet.AbstractFilterRegistrationBeanaddRegistration, addServletNames, addServletRegistrationBeans, addUrlPatterns, configure, determineDispatcherTypes, getDescription, getFilterName, getServletNames, getServletRegistrationBeans, getUrlPatterns, isMatchAfter, setDispatcherTypes, setDispatcherTypes, setMatchAfter, setServletNames, setServletRegistrationBeans, setUrlPatterns, toStringMethods inherited from class org.springframework.boot.web.servlet.DynamicRegistrationBeanaddInitParameter, getInitParameters, getOrDeduceName, isAsyncSupported, register, setAsyncSupported, setBeanName, setIgnoreRegistrationFailure, setInitParameters, setNameMethods inherited from class org.springframework.boot.web.servlet.RegistrationBeangetOrder, isEnabled, onStartup, setEnabled, setOrder
- 
Constructor Details- 
FilterRegistrationBeanpublic FilterRegistrationBean()Create a newFilterRegistrationBeaninstance.
- 
FilterRegistrationBeanCreate a newFilterRegistrationBeaninstance to be registered with the specifiedServletRegistrationBeans.- Parameters:
- filter- the filter to register
- servletRegistrationBeans- associate- ServletRegistrationBeans
 
 
- 
- 
Method Details- 
getFilterDescription copied from class:AbstractFilterRegistrationBeanReturn theFilterto be registered.- Specified by:
- getFilterin class- AbstractFilterRegistrationBean<T extends Filter>
- Returns:
- the filter
 
- 
setFilterSet the filter to be registered.- Parameters:
- filter- the filter
 
 
-