In the previous chapters, there are already configuration instructions for setting up Tomcat, and this section focuses on the next 3 Tomcat settings, each of which is somewhat differentiated.
1, directly in the Application.properties configuration, the following content from the official website description (
Part X. Appendices): server.address = # Network address to which the server should bind to. server.compression.enabled =false # If response compression is enabled. server.compression.excluded-user-agents = # List of user-agents to exclude from compression. server.compression.mime-types = # comma-separated List of MIME types that should be compressed. For instance ' Text/html,text/css,application/json ' server.compression.min-response-size = # Minimum Response size that is required for compression to be performed. For instance 2048 server.connection-timeout = # time in milliseconds that connectors would wait for another HTTP request is Fore closing the connection. When not set, the connector ' s container-specific default would be used. Use a value of-1 to indicate no (i.e. infinite) timeout. server.context-parameters.* = # Servlet Context init parameters. For instance ' Server.context-parameters.a=alpha ' Server.context-path = # context Path of the the application. Server.display-name =application # Display Name of The application. Server.max-http-header-size =0 # Maximum size in bytes of the HTTP message header. Server.max-http-post-size =0 # Maximum size in bytes of the HTTP post content. Server.error.include-stacktrace =never # When to include a "stacktrace" attribute. Server.error.path =/error # Path of the error controller. server.error.whitelabel.enabled =true # Enable The default error page displayed in browsers in case of a server error. Server.jetty.acceptors = # Number of acceptor threads to use. Server.jetty.selectors = # Number of selector threads to use. Server.jsp-servlet.class-name =org.apache.jasper.servlet.jspservlet # The class name of the JSP servlet. server.jsp-servlet.init-parameters.* = # init parameters used to configure the JSP servlet server.jsp-servlet.registered = True # Whether or not, the JSP servlet is registered server.port =8080 # server HTTP port. Server.server-header = # Value to use for the server response header (no header is sent if empty) Server.servlet-path =/# Path of the main dispatcher servlet. server.use-forward-headers = # If x-forwarded-* headers should is applied to the HttpRequest. server.session.cookie.comment = # Comment for the session cookie. Server.session.cookie.domain = # domain for the session cookie. server.session.cookie.http-only = # "HttpOnly" flag for the session cookie. Server.session.cookie.max-age = # Maximum Age of the session cookie in seconds. Server.session.cookie.name = # session cookie name. Server.session.cookie.path = # Path of the session cookie. server.session.cookie.secure = # "secure" flag for the session cookie. Server.session.persistent =false # Persist session data between restarts. Server.session.store-dir = # Directory used to store session data. Server.session.timeout = # session timeout in seconds. Server.session.tracking-modes = # session Tracking modes (one or more of the following: "Cookie", "url", "SSL"). Server.ssl.ciphers = # supported SSL ciphers. Server.ssl.client-auth = # Whether ClientAuthentication is wanted ("want") or needed ("need"). Requires a trust store. server.ssl.enabled = # Enable SSL support. Server.ssl.enabled-protocols = # enabled SSL protocols. Server.ssl.key-alias = # alias that identifies the key in the key store. Server.ssl.key-password = # password used to access the key in the key store. Server.ssl.key-store = # Path to the key store, that holds the SSL certificate (typically a JKS file). Server.ssl.key-store-password = # password used to access the key store. Server.ssl.key-store-provider = # Provider for the key store. Server.ssl.key-store-type = # type of the key store. Server.ssl.protocol =TLS # SSL protocol to use. Server.ssl.trust-store = # Trust store that holds SSL certificates. Server.ssl.trust-store-password = # password used to access the trust store. Server.ssl.trust-store-provider = # Provider for the Trust store. Server.ssl.trust-store-type = # type of the trust store. Server.tomcat.accesslog.directory =logs # directory in which log FIles is created. Can is relative to the Tomcat base dir or absolute. server.tomcat.accesslog.enabled =false # Enable access log. Server.tomcat.accesslog.pattern =common # Format pattern for access logs. Server.tomcat.accesslog.prefix =access_log # log file name prefix. Server.tomcat.accesslog.rename-on-rotate =false # Defer Inclusion of the date stamp in the file name until rotate time. Server.tomcat.accesslog.suffix =.log # log file name suffix. Server.tomcat.background-processor-delay =30 # Delay in seconds between the invocation of backgroundprocess methods. Server.tomcat.basedir = # Tomcat base directory. If not specified a temporary directory would be used. 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} # Regular Expression MatchinG Trusted IP addresses. Server.tomcat.max-threads =0 # Maximum amount of worker threads. Server.tomcat.min-spare-threads =0 # Minimum amount of worker threads. Server.tomcat.port-header =x-forwarded-port # Name of the HTTP header used to override the original port value. Server.tomcat.protocol-header = # header that holds the incoming protocol, usually named "X-forwarded-proto". Server.tomcat.protocol-header-https-value =https # Value of the protocol header that indicates the incoming request U SES SSL. Server.tomcat.redirect-context-root = # Whether requests to the context root should is redirected by appending a/to the Path. Server.tomcat.remote-ip-header = # Name of the HTTP header from which the remote IP is extracted. For instance ' x-forwarded-for ' server.tomcat.uri-encoding =utf-8 # Character encoding the URI.
2, the above is not server.tomcat part is a common configuration of multiple containers, in fact, through the Java configuration can also be common configuration, such as the following case:/** * for multiple servlet container versatility configuration, Tomcat, jetty, Undertow * @ Return
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.