Spring Boot 2.0.2 参考指南(通用的应用程序属性 ②)中文文档

通用的应用程序属性 ②

sendgrid(SendGridAutoConfiguration

spring.sendgrid.api-key= # SendGrid API key
spring.sendgrid.proxy.host= # SendGrid 代理主机
spring.sendgrid.proxy.port= # SendGrid 代理端口

嵌入式服务器配置(ServerProperties

# ----------------------------------------
# WEB 属性
# ----------------------------------------

server.address= # 服务器应该绑定到的网络地址
server.compression.enabled=false # 是否启用响应压缩
server.compression.excluded-user-agents= # 从压缩中排除的user-agent列表
server.compression.mime-types=text/html,text/xml,text/plain,text/css,text/javascript,application/javascript # 应该压缩的以逗号分隔的MIME类型列表
server.compression.min-response-size=2048 # 执行压缩所需的最小"Content-Length"值
server.connection-timeout= # 连接器在关闭连接之前等待另一个HTTP请求的时间,当没有设置时,使用连接器特定于容器的默认值,使用-1值表示不超时(即不限超时)
server.error.include-exception=false # 包括“exception”属性
server.error.include-stacktrace=never # 何时包含“stacktrace”属性
server.error.path=/error # error controller的路径
server.error.whitelabel.enabled=true # 是否启用浏览器中显示的默认error页面,以防出现服务器error
server.http2.enabled=false # 如果当前环境支持,是否启用HTTP/2支持
server.jetty.acceptors= # 使用的接收线程数
server.jetty.accesslog.append=false # 添加到日志
server.jetty.accesslog.date-format=dd/MMM/yyyy:HH:mm:ss Z # 请求日志的时间戳格式
server.jetty.accesslog.enabled=false # 启用访问日志
server.jetty.accesslog.extended-format=false # 启用扩展的NCSA格式
server.jetty.accesslog.file-date-format= # 日期格式放置在日志文件名中
server.jetty.accesslog.filename= # 日志文件名,如果没有指定,日志重定向到“System.err”
server.jetty.accesslog.locale= # 请求日志的语言环境
server.jetty.accesslog.log-cookies=false # 启用请求cookie的日志记录
server.jetty.accesslog.log-latency=false # 允许记录请求处理时间
server.jetty.accesslog.log-server=false # 启用对请求主机名的日志记录
server.jetty.accesslog.retention-period=31 # 在滚动日志前几天将被删除
server.jetty.accesslog.time-zone=GMT # 请求日志的时区
server.jetty.max-http-post-size=0 # HTTP post或put内容的最大大小(以字节为单位)
server.jetty.selectors= # 要使用的选择器线程数
server.max-http-header-size=0 # HTTP消息头的最大大小(以字节为单位)
server.port=8080 # 服务器HTTP端口
server.server-header= # 用于服务器响应header的值(如果为空,则不发送header)
server.use-forward-headers= # 是否应该将X-Forwarded-* header应用于HttpRequest
server.servlet.context-parameters.*= # Servlet上下文初始化参数
server.servlet.context-path= # 应用程序的上下文路径
server.servlet.application-display-name=application # 显示应用程序的名称
server.servlet.jsp.class-name=org.apache.jasper.servlet.JspServlet # JSP servlet的类名
server.servlet.jsp.init-parameters.*= # 用于配置JSP servlet的Init参数
server.servlet.jsp.registered=true # 是否注册了JSP servlet
server.servlet.path=/ # 主dispatcher servlet的路径
server.servlet.session.cookie.comment= # 对session cookie的注释
server.servlet.session.cookie.domain= # session cookie的域
server.servlet.session.cookie.http-only= # “HttpOnly”标记session cookie
server.servlet.session.cookie.max-age= # session cookie的最大时间,如果没有指定持续时间后缀,则将使用秒
server.servlet.session.cookie.name= # Session cookie的名称
server.servlet.session.cookie.path= # Session cookie的路径
server.servlet.session.cookie.secure= # Session cookie的“安全”标志
server.servlet.session.persistent=false # 是否在重新启动之间持久化session数据
server.servlet.session.store-dir= # 用于存储session数据的目录
server.servlet.session.timeout= # session超时,如果没有指定持续时间后缀,则将使用秒
server.servlet.session.tracking-modes= # session跟踪模式(以下一种或多种模式:“cookie”、“url”、“ssl”)
server.ssl.ciphers= # 支持SSL密码
server.ssl.client-auth= # 是否想要客户端身份验证(“want”)或需要(“need”),需要一个信任存储区
server.ssl.enabled= # 启用SSL支持
server.ssl.enabled-protocols= # 启用SSL协议
server.ssl.key-alias= # 标识密钥存储库中的密钥的别名
server.ssl.key-password= # 用于访问密钥存储库中的密钥的密码
server.ssl.key-store= # 包含SSL证书(通常是jks文件)的密钥存储库的路径
server.ssl.key-store-password= # 用于访问密钥存储库的密码
server.ssl.key-store-provider= # 密钥存储库的提供程序
server.ssl.key-store-type= # 密钥存储库的类型
server.ssl.protocol=TLS # 使用SSL协议
server.ssl.trust-store= # 托管SSL证书的信任存储区
server.ssl.trust-store-password= # 用于访问信任存储区的密码
server.ssl.trust-store-provider= # 信任存储区的提供程序
server.ssl.trust-store-type= # 信任存储区的类型
server.tomcat.accept-count=0 # Maximum queue length for incoming connection requests when all possible request processing threads are in use.
server.tomcat.accesslog.buffered=true # Whether to buffer output such that it is flushed only periodically.
server.tomcat.accesslog.directory=logs # Directory in which log files are created. Can be absolute or relative to the Tomcat base dir.
server.tomcat.accesslog.enabled=false # Enable access log.
server.tomcat.accesslog.file-date-format=.yyyy-MM-dd # Date format to place in the log file name.
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 # Whether to defer inclusion of the date stamp in the file name until rotate time.
server.tomcat.accesslog.request-attributes-enabled=false # Set request attributes for the IP address, Hostname, protocol, and port used for the request.
server.tomcat.accesslog.rotate=true # Whether to enable access log rotation.
server.tomcat.accesslog.suffix=.log # Log file name suffix.
server.tomcat.additional-tld-skip-patterns= # Comma-separated list of additional patterns that match jars to ignore for TLD scanning.
server.tomcat.background-processor-delay=30s # Delay between the invocation of backgroundProcess methods. If a duration suffix is not specified, seconds will be used.
server.tomcat.basedir= # Tomcat base directory. If not specified, a temporary directory is 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-connections=0 # Maximum number of connections that the server accepts and processes at any given time.
server.tomcat.max-http-header-size=0 # Maximum size, in bytes, of the HTTP message header.
server.tomcat.max-http-post-size=0 # Maximum size, in bytes, of the HTTP post content.
server.tomcat.max-threads=0 # Maximum number of worker threads.
server.tomcat.min-spare-threads=0 # Minimum number 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 indicating whether the incoming request uses SSL.
server.tomcat.redirect-context-root= # Whether requests to the context root should be 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.resource.cache-ttl= # Time-to-live of the static resource cache.
server.tomcat.uri-encoding=UTF-8 # Character encoding to use to decode the URI.
server.tomcat.use-relative-redirects= # Whether HTTP 1.1 and later location headers generated by a call to sendRedirect will use relative or absolute redirects.
server.undertow.accesslog.dir= # Undertow access log directory.
server.undertow.accesslog.enabled=false # Whether to enable the access log.
server.undertow.accesslog.pattern=common # Format pattern for access logs.
server.undertow.accesslog.prefix=access_log. # Log file name prefix.
server.undertow.accesslog.rotate=true # Whether to enable access log rotation.
server.undertow.accesslog.suffix=log # Log file name suffix.
server.undertow.buffer-size= # Size of each buffer, in bytes.
server.undertow.direct-buffers= # Whether to allocate buffers outside the Java heap.
server.undertow.io-threads= # Number of I/O threads to create for the worker.
server.undertow.eager-filter-init=true # Whether servlet filters should be initialized on startup.
server.undertow.max-http-post-size=0 # Maximum size, in bytes, of the HTTP post content.
server.undertow.worker-threads= # Number of worker threads.

freemarker(FreeMarkerProperties

# FREEMARKER (FreeMarkerProperties)
spring.freemarker.allow-request-override=false # Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.freemarker.allow-session-override=false # Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.freemarker.cache=false # Whether to enable template caching.
spring.freemarker.charset=UTF-8 # Template encoding.
spring.freemarker.check-template-location=true # Whether to check that the templates location exists.
spring.freemarker.content-type=text/html # Content-Type value.
spring.freemarker.enabled=true # Whether to enable MVC view resolution for this technology.
spring.freemarker.expose-request-attributes=false # Whether all request attributes should be added to the model prior to merging with the template.
spring.freemarker.expose-session-attributes=false # Whether all HttpSession attributes should be added to the model prior to merging with the template.
spring.freemarker.expose-spring-macro-helpers=true # Whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext".
spring.freemarker.prefer-file-system-access=true # Whether to prefer file system access for template loading. File system access enables hot detection of template changes.
spring.freemarker.prefix= # Prefix that gets prepended to view names when building a URL.
spring.freemarker.request-context-attribute= # Name of the RequestContext attribute for all views.
spring.freemarker.settings.*= # Well-known FreeMarker keys which are passed to FreeMarker's Configuration.
spring.freemarker.suffix=.ftl # Suffix that gets appended to view names when building a URL.
spring.freemarker.template-loader-path=classpath:/templates/ # Comma-separated list of template paths.
spring.freemarker.view-names= # White list of view names that can be resolved.

groovy template(GroovyTemplateProperties

# GROOVY TEMPLATES (GroovyTemplateProperties)
spring.groovy.template.allow-request-override=false # Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.groovy.template.allow-session-override=false # Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.groovy.template.cache=false # Whether to enable template caching.
spring.groovy.template.charset=UTF-8 # Template encoding.
spring.groovy.template.check-template-location=true # Whether to check that the templates location exists.
spring.groovy.template.configuration.*= # See GroovyMarkupConfigurer
spring.groovy.template.content-type=text/html # Content-Type value.
spring.groovy.template.enabled=true # Whether to enable MVC view resolution for this technology.
spring.groovy.template.expose-request-attributes=false # Whether all request attributes should be added to the model prior to merging with the template.
spring.groovy.template.expose-session-attributes=false # Whether all HttpSession attributes should be added to the model prior to merging with the template.
spring.groovy.template.expose-spring-macro-helpers=true # Whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext".
spring.groovy.template.prefix= # Prefix that gets prepended to view names when building a URL.
spring.groovy.template.request-context-attribute= # Name of the RequestContext attribute for all views.
spring.groovy.template.resource-loader-path=classpath:/templates/ # Template path.
spring.groovy.template.suffix=.tpl # Suffix that gets appended to view names when building a URL.
spring.groovy.template.view-names= # White list of view names that can be resolved.

spring hateoas(HateoasProperties

# SPRING HATEOAS (HateoasProperties)
spring.hateoas.use-hal-as-default-json-media-type=true # Whether application/hal+json responses should be sent to requests that accept application/json.

HTTP消息转换

# HTTP message conversion
spring.http.converters.preferred-json-mapper= # Preferred JSON mapper to use for HTTP message conversion. By default, auto-detected according to the environment.

HTTP编码

# HTTP message conversion
spring.http.converters.preferred-json-mapper= # Preferred JSON mapper to use for HTTP message conversion. By default, auto-detected according to the environment.
    原文作者:博弈
    原文地址: https://segmentfault.com/a/1190000015352239
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞