Server for SpringBoot configuration properties

  spring, springboot

SpringBoot configuration property series

In addition, I attach some personal articles about springboot.

Server configuration

  • server.address
    Specifies the address of the server binding

  • server.compression.enabled
    Whether compression is turned on or not is set to false by default.

  • server.compression.excluded-user-agents
    Specify uncompressed user-agent, multiple of which are separated by commas. the default values are: text/html, text/XML, text/plain, text/CSS

  • server.compression.mime-types
    Specify MIME type to compress, multiple separated by commas.

  • server.compression.min-response-size
    The threshold for compression is 2048 by default

  • server.context-parameters.[param name]
    Set servlet context parameters

  • server.context-path
    Set the context-path of the application.

  • server.display-name
    Set the display name of the application. Default: Application

  • server.jsp-servlet.class-name
    Set servlet for compiling JSP, default: org.apache.jasper


  • server.jsp-servlet.init-parameters.[param name]
    Set JSP servlet initialization parameters.

  • server.jsp-servlet.registered
    Set whether JSP servlet is registered to the embedded servlet container, the default is true

  • server.port
    Set http Listening Port

  • server.servlet-path
    Set the listening path of dispatcher servlet, the default is:/

Cookie, session configuration

  • server.session.cookie.comment
    Comment specifying session cookie

  • server.session.cookie.domain
    Domain specifying session cookie

  • server.session.cookie.http-only
    Whether to turn on HttpOnly.

  • server.session.cookie.max-age
    Set the maximum age for session cookie.

    Set the name of the Session cookie.

  • server.session.cookie.path
    Set the path to the session cookie.

    Set “Secure” flag for session cookie.

  • server.session.persistent
    Whether to persist the session when restarting; false by default

  • server.session.timeout
    Timeout for session

  • server.session.tracking-modes
    Set the Session tracking mode (cookie, url, ssl).

Ssl configuration

  • server.ssl.ciphers
    Whether sslpciphers is supported.

  • server.ssl.client-auth
    Set whether client authentication is wanted or needed.

  • server.ssl.enabled
    Whether ssl is turned on, default: true

  • server.ssl.key-alias
    Set alias of key in key store.

  • server.ssl.key-password
    Password to access key in key store.

  • server.ssl.key-store
    Set the path to the key store that holds SSL certificate, usually a jks file.

  • server.ssl.key-store-password
    Set the password to access key store.

  • server.ssl.key-store-provider
    Set the provider of key store.

  • server.ssl.key-store-type
    Set the type of key store.

  • server.ssl.protocol
    SSL protocol used, default: TLS

    Trust store, which holds SSL certificates.

    The password to access trust store.

    Set the trust store provider.

    Specifies the type of trust store.


  • server.tomcat.access-log-enabled
    Whether to open access log, default: false)

  • server.tomcat.access-log-pattern
    Set the format of access logs, default: common

    Set the directory of log, default: logs

  • server.tomcat.accesslog.enabled
    Whether to open access log, default: false

  • server.tomcat.accesslog.pattern
    Set the format of access logs, default: common

  • server.tomcat.accesslog.prefix
    Set prefix of Log file, default: access_log

  • server.tomcat.accesslog.suffix
    Set suffix of Log file, default: .log

  • server.tomcat.background-processor-delay
    Delay size of background thread method: 30

  • server.tomcat.basedir
    Set Tomcat’s base directory and use temporary directory if not specified.

  • server.tomcat.internal-proxies
    Set a regular expression for trust, default: “10 \. \ d {1,3} \. \ d {1,3} \. \ d {1,3} | 192 \ .168 \. \ d {1,3} \. \ d {1,3} | 169 \ .254 \. \ d {1,3} \. \ d {1,3} | 127 \. \ d {1,3} \. \ d {1,3} \. \ d {1,3} | 172 \ .1 [6-9] {1} \ .\d{1,3}\.\d{1,3}| 172\.2[0-9]{1}\.\d{1,3}\.\d{1,3}|172\.3[0-1]{1}\.\d{1,3}\.\d{1,3}”

  • server.tomcat.max-http-header-size
    Set the minimum value of http header, default: 0

  • server.tomcat.max-threads
    Set the maximum number of working threads for tomcat, the default is: 0

  • server.tomcat.port-header
    Set the value used by http header to override the original port.

  • server.tomcat.protocol-header
    Set the protocol the Header contains, usually X-Forwarded-Proto, and if remoteIpHeader has a value, it will be set to RemoteIpValve.

  • server.tomcat.protocol-header-https-value
    Set the value of header using SSL, default https.

  • server.tomcat.remote-ip-header
    Set the remote IP header, or RemoteIpValve if remoteIpHeader has a value.

  • server.tomcat.uri-encoding
    Sets the decoded character set of the URI.


  • server.undertow.access-log-dir
    Set the directory of Undertow access log, default: logs

  • server.undertow.access-log-enabled
    Whether to open access log, default: false

  • server.undertow.access-log-pattern
    Set the format of access logs, default: common

  • server.undertow.accesslog.dir
    Set the directory of access log.

  • server.undertow.buffer-size
    Set the size of buffer.

  • server.undertow.buffers-per-region
    Sets the number of buffer per region

    Setting Out-of-heap Memory

    Set the number of I/O threads.

  • server.undertow.worker-threads
    Sets the number of worker threads