接口 ConfigurableWebServerFactory

所有超级接口:
ErrorPageRegistry, WebServerFactory
所有已知子接口:
ConfigurableJettyWebServerFactory, ConfigurableReactiveWebServerFactory, ConfigurableServletWebServerFactory, ConfigurableTomcatWebServerFactory, ConfigurableUndertowWebServerFactory
所有已知实现类:
AbstractConfigurableWebServerFactory, AbstractReactiveWebServerFactory, AbstractServletWebServerFactory, JettyReactiveWebServerFactory, JettyServletWebServerFactory, NettyReactiveWebServerFactory, TomcatReactiveWebServerFactory, TomcatServletWebServerFactory, UndertowReactiveWebServerFactory, UndertowServletWebServerFactory

public interface ConfigurableWebServerFactory extends WebServerFactory, ErrorPageRegistry
A configurable WebServerFactory.
从以下版本开始:
2.0.0
作者:
Phillip Webb, Brian Clozel, Scott Frederick
另请参阅:
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Sets the specific network address that the server should bind to.
    void
    Sets the compression configuration that will be applied to the server's default connector.
    void
    setErrorPages(Set<? extends ErrorPage> errorPages)
    Sets the error pages that will be used when handling exceptions.
    void
    setHttp2(Http2 http2)
    Sets the HTTP/2 configuration that will be applied to the server.
    void
    setPort(int port)
    Sets the port that the web server should listen on.
    void
    setServerHeader(String serverHeader)
    Sets the server header value.
    default void
    Sets the shutdown configuration that will be applied to the server.
    void
    setSsl(Ssl ssl)
    Sets the SSL configuration that will be applied to the server's default connector.
    void
    Sets the SSL bundles that can be used to configure SSL connections.

    从接口继承的方法 org.springframework.boot.web.server.ErrorPageRegistry

    addErrorPages
  • 方法详细资料

    • setPort

      void setPort(int port)
      Sets the port that the web server should listen on. If not specified port '8080' will be used. Use port -1 to disable auto-start (i.e. start the web application context but not have it listen to any port).
      参数:
      port - the port to set
    • setAddress

      void setAddress(InetAddress address)
      Sets the specific network address that the server should bind to.
      参数:
      address - the address to set (defaults to null)
    • setErrorPages

      void setErrorPages(Set<? extends ErrorPage> errorPages)
      Sets the error pages that will be used when handling exceptions.
      参数:
      errorPages - the error pages
    • setSsl

      void setSsl(Ssl ssl)
      Sets the SSL configuration that will be applied to the server's default connector.
      参数:
      ssl - the SSL configuration
    • setSslBundles

      void setSslBundles(SslBundles sslBundles)
      Sets the SSL bundles that can be used to configure SSL connections.
      参数:
      sslBundles - the SSL bundles
      从以下版本开始:
      3.1.0
    • setHttp2

      void setHttp2(Http2 http2)
      Sets the HTTP/2 configuration that will be applied to the server.
      参数:
      http2 - the HTTP/2 configuration
    • setCompression

      void setCompression(Compression compression)
      Sets the compression configuration that will be applied to the server's default connector.
      参数:
      compression - the compression configuration
    • setServerHeader

      void setServerHeader(String serverHeader)
      Sets the server header value.
      参数:
      serverHeader - the server header value
    • setShutdown

      default void setShutdown(Shutdown shutdown)
      Sets the shutdown configuration that will be applied to the server.
      参数:
      shutdown - the shutdown configuration
      从以下版本开始:
      2.3.0