Spring Boot 2.0.2 參考指南(通用的應用程式屬性 ②)中文文件

博弈發表於2019-01-19

通用的應用程式屬性 ②

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.

相關文章