批注接口 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
- 另请参阅:
-
可选元素概要
可选元素修饰符和类型可选元素说明boolean
Whether asynchronous operations are supported for this registration.boolean
Whether this registration is enabled.boolean
Whether registration failures should be ignored.Init parameters to be used with the servlet.int
TheloadOnStartup
priority.The multipart configuration.Name of this registration.int
Order 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, anIllegalStateException
will 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 loadOnStartupTheloadOnStartup
priority. SeeServletRegistration.Dynamic.setLoadOnStartup(int)
for details.- 返回:
- the
loadOnStartup
priority
- 默认值:
-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
-