Annotation Interface ServletBean


@Documented @Target(METHOD) @Retention(RUNTIME) @Bean public @interface ServletBean
Variant of WebServlet applicable to factory methods.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of the servlet.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Declares whether the servlet supports asynchronous operation mode.
    jakarta.servlet.annotation.WebInitParam[]
    The init parameters of the servlet.
    int
    The load-on-startup order of the servlet.
    The URL patterns of the servlet.
    The URL patterns of the servlet.
  • Element Details

    • name

      @AliasFor(annotation=jakarta.servlet.annotation.WebServlet.class, member="name") String name
      The name of the servlet.
      Returns:
      the name of the servlet
    • value

      @AliasFor(annotation=jakarta.servlet.annotation.WebServlet.class, member="value") String[] value
      The URL patterns of the servlet.
      Returns:
      the URL patterns of the servlet
      Default:
      {}
    • urlPatterns

      @AliasFor(annotation=jakarta.servlet.annotation.WebServlet.class, member="value") String[] urlPatterns
      The URL patterns of the servlet.
      Returns:
      the URL patterns of the servlet
      Default:
      {}
    • loadOnStartup

      @AliasFor(annotation=jakarta.servlet.annotation.WebServlet.class, member="loadOnStartup") int loadOnStartup
      The load-on-startup order of the servlet.
      Returns:
      the load-on-startup order of the servlet
      Default:
      -1
    • initParams

      @AliasFor(annotation=jakarta.servlet.annotation.WebServlet.class, member="initParams") jakarta.servlet.annotation.WebInitParam[] initParams
      The init parameters of the servlet.
      Returns:
      the init parameters of the servlet
      Default:
      {}
    • asyncSupported

      @AliasFor(annotation=jakarta.servlet.annotation.WebServlet.class, member="asyncSupported") boolean asyncSupported
      Declares whether the servlet supports asynchronous operation mode.
      Returns:
      true if the servlet supports asynchronous operation mode
      See Also:
      • ServletRequest.startAsync()
      • ServletRequest.startAsync(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse)
      Default:
      false