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 Summary
Optional 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
-
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
-
ignoreRegistrationFailure
boolean 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
-
urlMappings
String[] urlMappingsURL mappings for the servlet. If not specified the mapping will default to '/'.- Returns:
- the url mappings
- Default:
{}
-
loadOnStartup
int loadOnStartupTheloadOnStartuppriority. SeeServletRegistration.Dynamic.setLoadOnStartup(int)for details.- Returns:
- the
loadOnStartuppriority
- Default:
-1
-
initParameters
WebInitParam[] initParametersInit parameters to be used with the servlet.- Returns:
- the init parameters
- Default:
{}
-
multipartConfig
MultipartConfig multipartConfigThe multipart configuration.- Returns:
- the multipart configuration
- Default:
@jakarta.servlet.annotation.MultipartConfig
-