Annotation Interface ServletRegistration
Registers a 
Servlet in a Servlet 3.0+ container. Can be used as an
 annotation-based alternative to ServletRegistrationBean.- Since:
- 3.5.0
- Author:
- Moritz Halbritter, Dmytro Danilenkov
- See Also:
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether asynchronous operations are supported for this registration.booleanWhether this registration is enabled.booleanWhether registration failures should be ignored.Init parameters to be used with the servlet.intTheloadOnStartuppriority.The multipart configuration.Name of this registration.intOrder of the registration bean.String[]URL mappings for the servlet.
- 
Element Details- 
enabledboolean enabledWhether this registration is enabled.- Returns:
- whether this registration is enabled
 - Default:
- true
 
- 
orderOrder of the registration bean.- Returns:
- the order of the registration bean
 - Default:
- 2147483647
 
- 
nameString nameName of this registration. If not specified the bean name will be used.- Returns:
- the name
 - Default:
- ""
 
- 
asyncSupportedboolean asyncSupportedWhether asynchronous operations are supported for this registration.- Returns:
- whether asynchronous operations are supported
 - Default:
- true
 
- 
ignoreRegistrationFailureboolean ignoreRegistrationFailureWhether registration failures should be ignored. If set to true, a failure will be logged. If set to false, anIllegalStateExceptionwill be thrown.- Returns:
- whether registration failures should be ignored
 - Default:
- false
 
- 
urlMappingsString[] urlMappingsURL mappings for the servlet. If not specified the mapping will default to '/'.- Returns:
- the url mappings
 - Default:
- {}
 
- 
loadOnStartupint loadOnStartupTheloadOnStartuppriority. SeeServletRegistration.Dynamic.setLoadOnStartup(int)for details.- Returns:
- the loadOnStartuppriority
 - Default:
- -1
 
- 
initParametersWebInitParam[] initParametersInit parameters to be used with the servlet.- Returns:
- the init parameters
 - Default:
- {}
 
- 
multipartConfigMultipartConfig multipartConfigThe multipart configuration.- Returns:
- the multipart configuration
 - Default:
- @jakarta.servlet.annotation.MultipartConfig
 
 
-