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
- 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.jakarta.servlet.annotation.WebInitParam[]Init parameters to be used with the servlet.intTheloadOnStartuppriority.jakarta.servlet.annotation.MultipartConfigThe 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
 
- 
order@AliasFor(annotation=org.springframework.core.annotation.Order.class, attribute="value") int 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
 
- 
initParametersjakarta.servlet.annotation.WebInitParam[] initParametersInit parameters to be used with the servlet.- Returns:
- the init parameters
 - Default:
- {}
 
- 
multipartConfigjakarta.servlet.annotation.MultipartConfig multipartConfigThe multipart configuration.- Returns:
- the multipart configuration
 - Default:
- @jakarta.servlet.annotation.MultipartConfig
 
 
-