Annotation Interface FilterRegistration
Registers a
Filter
in a Servlet 3.0+ container. Can be used as an
annotation-based alternative to FilterRegistrationBean
.- Since:
- 3.5.0
- Author:
- Moritz Halbritter, Daeho Kwon
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
Whether asynchronous operations are supported for this registration.Dispatcher types that should be used with the registration.boolean
Whether this registration is enabled.boolean
Whether registration failures should be ignored.Init parameters to be used with the filter.boolean
Whether the filter mappings should be matched after any declared Filter mappings of the ServletContext.Name of this registration.int
Order of the registration bean.Class<?>[]
Servlet classes that the filter will be registered against.String[]
Servlet names that the filter will be registered against.String[]
URL patterns, as defined in the Servlet specification, that the filter will be registered against.
-
Element Details
-
enabled
boolean enabledWhether this registration is enabled.- Returns:
- whether this registration is enabled
- Default:
- true
-
order
Order of the registration bean.- Returns:
- the order of the registration bean
- Default:
- 2147483647
-
name
String nameName of this registration. If not specified the bean name will be used.- Returns:
- the name
- Default:
- ""
-
asyncSupported
boolean asyncSupportedWhether asynchronous operations are supported for this registration.- Returns:
- whether asynchronous operations are supported
- Default:
- true
-
dispatcherTypes
DispatcherType[] dispatcherTypesDispatcher types that should be used with the registration.- Returns:
- the dispatcher types
- Default:
- {}
-
ignoreRegistrationFailure
boolean ignoreRegistrationFailureWhether registration failures should be ignored. If set to true, a failure will be logged. If set to false, anIllegalStateException
will be thrown.- Returns:
- whether registration failures should be ignored
- Default:
- false
-
initParameters
WebInitParam[] initParametersInit parameters to be used with the filter.- Returns:
- the init parameters
- Default:
- {}
-
matchAfter
boolean matchAfterWhether the filter mappings should be matched after any declared Filter mappings of the ServletContext.- Returns:
- whether the filter mappings should be matched after any declared Filter mappings of the ServletContext
- Default:
- false
-
servletNames
String[] servletNamesServlet names that the filter will be registered against.- Returns:
- the servlet names
- Default:
- {}
-
servletClasses
Class<?>[] servletClassesServlet classes that the filter will be registered against.- Returns:
- the servlet classes
- Default:
- {}
-
urlPatterns
String[] urlPatternsURL patterns, as defined in the Servlet specification, that the filter will be registered against.- Returns:
- the url patterns
- Default:
- {}
-