批注接口 ServletRegistration


@Target({METHOD,TYPE}) @Retention(RUNTIME) @Documented @Order public @interface 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
另请参阅:
  • 元素详细资料

    • enabled

      boolean enabled
      Whether 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 name
      Name of this registration. If not specified the bean name will be used.
      返回:
      the name
      默认值:
      ""
    • asyncSupported

      boolean asyncSupported
      Whether asynchronous operations are supported for this registration.
      返回:
      whether asynchronous operations are supported
      默认值:
      true
    • ignoreRegistrationFailure

      boolean ignoreRegistrationFailure
      Whether registration failures should be ignored. If set to true, a failure will be logged. If set to false, an IllegalStateException will be thrown.
      返回:
      whether registration failures should be ignored
      默认值:
      false
    • urlMappings

      String[] urlMappings
      URL mappings for the servlet. If not specified the mapping will default to '/'.
      返回:
      the url mappings
      默认值:
      {}
    • loadOnStartup

      int loadOnStartup
      The loadOnStartup priority. See ServletRegistration.Dynamic.setLoadOnStartup(int) for details.
      返回:
      the loadOnStartup priority
      默认值:
      -1
    • initParameters

      WebInitParam[] initParameters
      Init parameters to be used with the servlet.
      返回:
      the init parameters
      默认值:
      {}
    • multipartConfig

      MultipartConfig multipartConfig
      The multipart configuration.
      返回:
      the multipart configuration
      默认值:
      @jakarta.servlet.annotation.MultipartConfig