批注接口 ServletRegistration
Registers a
Servlet in a Servlet 3.0+ container. Can be used as an
annotation-based alternative to ServletRegistrationBean.- 从以下版本开始:
- 3.5.0
- 作者:
- Moritz Halbritter, Dmytro Danilenkov
- 另请参阅:
-
可选元素概要
可选元素修饰符和类型可选元素说明booleanWhether 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.
-
元素详细资料
-
enabled
boolean enabledWhether this registration is enabled.- 返回:
- whether this registration is enabled
- 默认值:
true
-
order
Order of the registration bean.- 返回:
- the order of the registration bean
- 默认值:
2147483647
-
name
String nameName of this registration. If not specified the bean name will be used.- 返回:
- the name
- 默认值:
""
-
asyncSupported
boolean asyncSupportedWhether asynchronous operations are supported for this registration.- 返回:
- whether asynchronous operations are supported
- 默认值:
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.- 返回:
- whether registration failures should be ignored
- 默认值:
false
-
urlMappings
String[] urlMappingsURL mappings for the servlet. If not specified the mapping will default to '/'.- 返回:
- the url mappings
- 默认值:
{}
-
loadOnStartup
int loadOnStartupTheloadOnStartuppriority. SeeServletRegistration.Dynamic.setLoadOnStartup(int)for details.- 返回:
- the
loadOnStartuppriority
- 默认值:
-1
-
initParameters
WebInitParam[] initParametersInit parameters to be used with the servlet.- 返回:
- the init parameters
- 默认值:
{}
-
multipartConfig
MultipartConfig multipartConfigThe multipart configuration.- 返回:
- the multipart configuration
- 默认值:
@jakarta.servlet.annotation.MultipartConfig
-