资讯专栏INFORMATION COLUMN

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

WelliJhon / 2247人阅读

摘要:通用的应用程序属性代理主机代理端口嵌入式服务器配置属性服务器应该绑定到的网络地

通用的应用程序属性 ② 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://www.ucloud.cn/yun/71284.html

相关文章

  • Spring Boot 参考指南(目录)

    摘要:参考指南使你可以轻松地创建可运行的独立的生产级的基于的应用程序,我们对平台和第三方库有自己的看法,这样你就可以以最低限度工作开始了,大多数应用程序都需要很少的配置。文档本节简要概述了参考文档,它充当文档其余部分的映射。 Spring Boot 参考指南 Spring Boot使你可以轻松地创建可运行的独立的、生产级的基于Spring的应用程序,我们对Spring平台和第三方库有自己的看...

    awesome23 评论0 收藏0
  • Spring Boot学习之路(02):和你一起阅读Spring Boot官网

    摘要:那接下来,我们一起来阅读一下官网。版本号表示是稳定版本推荐一篇版本号解释说明版本号解释说明关于问题这里可以提交中的问题。二总结通过官网的了解,我们可以知道的版本号说明,相关说明文档,简单样例,源码。 showImg(https://segmentfault.com/img/remote/1460000019536204); 官网是我们学习的第一手资料,我们不能忽视它。却往往因为是英文版...

    psychola 评论0 收藏0
  • Spring Boot 学习资料收集

    摘要:系列文章更新计划列表主要对一些中常用的框架进行简单的介绍及快速上手,外加相关资料的收集更新列表会不定期的加入新的内容以进行扩充,如果你对此感兴趣可以站内联系我。 导读: 从第一次接触Spring Boot 至今已经有半年多了,在这期间也浏览了许多和Spring Boot 相关的书籍及文章,公司里面的许多项目也一直在使用Spring Boot。关于Spring Boot的一些看法:Spr...

    mmy123456 评论0 收藏0
  • Spring Boot 参考指南通用应用程序属性 ①)

    摘要:第章附录附录通用的应用程序属性可以在文件,文件,或作为命令行开关,中指定各种属性,本附录提供了一个通用的属性列表和对使用它们的底层类的引用。本示例文件仅作为指南,不要将整个内容复制粘贴到应用程序中,相反,只选择你需要的属性。 第X章. 附录 附录A. 通用的应用程序属性 可以在application.properties文件,application.yml文件,或作为命令行开关,中指定...

    ispring 评论0 收藏0
  • Spring Boot 参考指南(消息传递)

    摘要:还自动配置发送和接收消息所需的基础设施。支持是一个轻量级的可靠的可伸缩的可移植的消息代理,基于协议,使用通过协议进行通信。 32. 消息传递 Spring框架为与消息传递系统集成提供了广泛的支持,从使用JmsTemplate简化的JMS API到使用完整的基础设施异步接收消息,Spring AMQP为高级消息队列协议提供了类似的特性集。Spring Boot还为RabbitTempla...

    Doyle 评论0 收藏0

发表评论

0条评论

WelliJhon

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<