直接在application.properties配置。参见官网说明(Part X. Appendices)
#Network address to which the server should bind to.
server.address=
#If response compression is enabled(tomcat: compression="on").
server.compression.enabled=true
#List of user-agents to exclude from compression(tomcat: noCompressionUserAgents="gozilla,traviata").
server.compression.excluded-user-agents=gozilla,traviata
#Comma-separated list of MIME types that should be compressed.
#For instance `text/html,text/css,application/json` (tomcat: compressableMimeType="text/html,text/xml,text/plain,text/css,application/json").
server.compression.mime-types=text/html,text/xml,text/plain,text/css,application/json
#Minimum response size that is required for compression to be performed.
#For instance 2048(tomcat: compressionMinSize="2048")
server.compression.min-response-size=2048
#Time in milliseconds that connectors will wait for another HTTP request before closing the connection. When not set, the connector's container-specific default will be used.
#Use a value of -1 to indicate no (i.e. infinite) timeout. (tomcat: connectionTimeout="20000")
server.connection-timeout=20000
#Servlet context init parameters. For instance `server.context-parameters.a=alpha`
server.context-parameters.*=
#Context path of the application.
server.context-path=
#Server HTTP port.
server.port=8080
#Display name of the application.
server.display-name=application
#Maximum size in bytes of the HTTP message header.
server.max-http-header-size=0
#Maximum size in bytes of the HTTP post content.
server.max-http-post-size=0
#When to include a "stacktrace" attribute.
server.error.include-stacktrace=never
#Path of the error controller.
server.error.path=/error
#Enable the default error page displayed in browsers in case of a server error.
server.error.whitelabel.enabled=true
#Number of acceptor threads to use.
server.jetty.acceptors=
#Number of selector threads to use.
server.jetty.selectors=
#The class name of the JSP servlet.
server.jsp-servlet.class-name=org.apache.jasper.servlet.JspServlet
#Init parameters used to configure the JSP servlet
server.jsp-servlet.init-parameters.*=
#Whether or not the JSP servlet is registered
server.jsp-servlet.registered=true
#Value to use for the Server response header (no header is sent if empty)
server.server-header=
#Path of the main dispatcher servlet.
server.servlet-path=/
#If X-Forwarded-* headers should be applied to the HttpRequest.
server.use-forward-headers=
#Comment for the session cookie.
server.session.cookie.comment=
#Domain for the session cookie.
server.session.cookie.domain=
#"HttpOnly" flag for the session cookie.
server.session.cookie.http-only=
#Maximum age of the session cookie in seconds.
server.session.cookie.max-age=
#Session cookie name.
server.session.cookie.name=
#Path of the session cookie.
server.session.cookie.path=
#"Secure" flag for the session cookie.
server.session.cookie.secure=
#Persist session data between restarts.
server.session.persistent=false
#Directory used to store session data.
server.session.store-dir=
#Session timeout in seconds.
server.session.timeout=
#Session tracking modes (one or more of the following: "cookie", "url", "ssl").
server.session.tracking-modes=
#Supported SSL ciphers.
server.ssl.ciphers=
#Whether client authentication is wanted ("want") or needed ("need"). Requires a trust store.
server.ssl.client-auth=
#Enable SSL support.
server.ssl.enabled=
#Enabled SSL protocols.
server.ssl.enabled-protocols=
#Alias that identifies the key in the key store.
server.ssl.key-alias=
#Password used to access the key in the key store.
server.ssl.key-password=
#Path to the key store that holds the SSL certificate (typically a jks file).
server.ssl.key-store=
#Password used to access the key store.
server.ssl.key-store-password=
#Provider for the key store.
server.ssl.key-store-provider=
#Type of the key store.
server.ssl.key-store-type=
#SSL protocol to use.
server.ssl.protocol=TLS
#Trust store that holds SSL certificates.
server.ssl.trust-store=
#Password used to access the trust store.
server.ssl.trust-store-password=
#Provider for the trust store.
server.ssl.trust-store-provider=
#Type of the trust store.
server.ssl.trust-store-type=
#Directory in which log files are created. Can be relative to the tomcat base dir or absolute.
server.tomcat.accesslog.directory=logs
#Enable access log.
server.tomcat.accesslog.enabled=false
#Format pattern for access logs.
server.tomcat.accesslog.pattern=common
#Log file name prefix.
server.tomcat.accesslog.prefix=access_log
#Defer inclusion of the date stamp in the file name until rotate time.
server.tomcat.accesslog.rename-on-rotate=false
#Log file name suffix.
server.tomcat.accesslog.suffix=.log
#Delay in seconds between the invocation of backgroundProcess methods.
server.tomcat.background-processor-delay=30
#Tomcat base directory. If not specified a temporary directory will be used.
server.tomcat.basedir=
#regular expression matching trusted IP addresses.
server.tomcat.internal-proxies=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}
#Maximum amount of worker threads.
server.tomcat.max-threads=0
#Minimum amount of worker threads.
server.tomcat.min-spare-threads=0
#Name of the HTTP header used to override the original port value.
server.tomcat.port-header=X-Forwarded-Port
#Header that holds the incoming protocol, usually named "X-Forwarded-Proto".
server.tomcat.protocol-header=
#Value of the protocol header that indicates that the incoming request uses SSL.
server.tomcat.protocol-header-https-value=https
#Whether requests to the context root should be redirected by appending a / to the path.
server.tomcat.redirect-context-root=
#Name of the http header from which the remote ip is extracted. For instance `X-FORWARDED-FOR`
server.tomcat.remote-ip-header=
#Character encoding to use to decode the URI.
server.tomcat.uri-encoding=UTF-8