天天看點

SpringBoot學習筆記(三、配置)

一、application.properties

SpringBoot學習筆記(三、配置)

上面這個目錄下的application.properties就是SpringBoot的配置檔案。

這個配置檔案裡,有着SpringBoot的一些常見配置,比如端口、上下文等,一些常用的配置如下。

# ----------------------------------------
# 核心屬性
# ----------------------------------------

# 檔案編碼
banner.charset= UTF-8
# 檔案位置
banner.location= classpath:banner.txt


# 日志配置
# 日志配置檔案的位置。 例如對于Logback的`classpath:logback.xml`
logging.config= 
# %wEx#記錄異常時使用的轉換字。
logging.exception-conversion-word= 
# 日志檔案名。 例如`myapp.log`
logging.file= 
# 日志級别嚴重性映射。 例如`logging.level.org.springframework =  DEBUG`
logging.level.*= 
# 日志檔案的位置。 例如`/ var / log`
logging.path= 
# 用于輸出到控制台的Appender模式。 隻支援預設的logback設定。
logging.pattern.console= 
# 用于輸出到檔案的Appender模式。 隻支援預設的logback設定。
logging.pattern.file= 
# 日志級别的Appender模式(預設%5p)。 隻支援預設的logback設定。
logging.pattern.level= 
#注冊日志記錄系統的初始化挂鈎。
logging.register-shutdown-hook= false


# AOP 切面
# 添加@EnableAspectJAutoProxy。
spring.aop.auto= true
# 是否要建立基于子類(CGLIB)的代理(true),而不是基于标準的基于Java接口的代理(false)。
spring.aop.proxy-target-class= false


# 應用程式上下文初始化器
# 應用名額。
spring.application.index= 
# 應用程式名稱。
spring.application.name= 


# 國際化(消息源自動配置)
#
spring.messages.basename= messages
# 以逗号分隔的基礎名稱清單,每個都在ResourceBundle約定之後。
# 加載的資源束檔案緩存到期,以秒為機關。 設定為-1時,軟體包将永久緩存。
spring.messages.cache-seconds= -1
# 消息編碼。
spring.messages.encoding= UTF-8
# 設定是否傳回到系統區域設定,如果沒有找到特定語言環境的檔案。
spring.messages.fallback-to-system-locale= true


# REDIS (Redis 配置)
# 連接配接工廠使用的資料庫索引。
spring.redis.database= 0
# Redis伺服器主機。
spring.redis.host= localhost
# 登入redis伺服器的密碼。
spring.redis.password= 
# 給定時間池可以配置設定的最大連接配接數。 使用負值為無限制。
spring.redis.pool.max-active= 8
# 池中“空閑”連接配接的最大數量。 使用負值來表示無限數量的空閑連接配接。
spring.redis.pool.max-idle= 8
# 連接配接配置設定在池耗盡之前在抛出異常之前應阻止的最大時間量(以毫秒為機關)。 使用負值無限期地阻止。
spring.redis.pool.max-wait= -1
# 定義池中維護的最小空閑連接配接數。 此設定隻有在正值時才有效果。
spring.redis.pool.min-idle= 0
# redis伺服器端口
spring.redis.port= 6379
# redis伺服器名稱
spring.redis.sentinel.master=
# 
spring.redis.sentinel.nodes= 
# 連接配接逾時(毫秒)。
spring.redis.timeout= 0


# 管理者 (Spring應用程式管理者JMX自動配置)
# 開啟應用管理功能。
spring.application.admin.enabled= false
# JMX應用程式名稱MBean。
spring.application.admin.jmx-name= org.springframework.boot:type= Admin,name= SpringApplication


# 自動配置
# 自動配置類排除。
spring.autoconfigure.exclude= 


# spring 核心配置
# 跳過搜尋BeanInfo類。
spring.beaninfo.ignore= true


# spring 緩存配置
# 由底層緩存管理器支援的要建立的緩存名稱的逗号分隔清單。
spring.cache.cache-names= 
# 用于初始化EhCache的配置檔案的位置。
spring.cache.ehcache.config= 
# 用于建立緩存的規範。 檢查CacheBuilderSpec有關規格格式的更多細節。
spring.cache.guava.spec= 
# 用于初始化Hazelcast的配置檔案的位置。
spring.cache.hazelcast.config= 
# 用于初始化Infinispan的配置檔案的位置。
spring.cache.infinispan.config= 
# 用于初始化緩存管理器的配置檔案的位置。
spring.cache.jcache.config= 
# 用于檢索符合JSR-107的緩存管理器的CachingProvider實作的完全限定名稱。 隻有在類路徑上有多個JSR-107實作可用時才需要。
spring.cache.jcache.provider= 
# 緩存類型,預設情況下根據環境自動檢測。
spring.cache.type= 


# spring配置 (配置檔案應用偵聽器)
# 配置檔案位置。
spring.config.location= 
# 配置檔案名。
spring.config.name= application


# hazelcast配置(Hazelcast是一個高度可擴充的資料分發和叢集平台,提供了高效的、可擴充的分布式資料存儲、資料緩存.)
# 用于初始化Hazelcast的配置檔案的位置。
spring.hazelcast.config= 


# JMX
# JMX域名。
spring.jmx.default-domain= 
# 将管理bean暴露給JMX域。
spring.jmx.enabled= true
# MBean伺服器bean名稱。
spring.jmx.server= mbeanServer


# Email (MailProperties)  郵件屬性
# 預設MimeMessage編碼。
spring.mail.default-encoding= UTF-8
# SMTP伺服器主機。 例如`smtp.example.com`
spring.mail.host= 
# 會話JNDI名稱。 設定時,優先于其他郵件設定。
spring.mail.jndi-name= 
# 登入SMTP伺服器的密碼。
spring.mail.password= 
# SMTP伺服器端口。
spring.mail.port= 
# 其他JavaMail會話屬性。
spring.mail.properties.*= 
# SMTP伺服器使用的協定。
spring.mail.protocol= smtp
# 測試郵件伺服器在啟動時可用。
spring.mail.test-connection= false
# 登入SMTP伺服器的使用者。
spring.mail.username= 


# 應用設定(spring應用)
# 用于在應用程式運作時顯示橫幅的模式。
spring.main.banner-mode= console
# 源(類名,包名或XML資源位置)包含在ApplicationContext中。
spring.main.sources= 
# 在Web環境中運作應用程式(預設情況下自動檢測)。
spring.main.web-environment= 


# 檔案編碼(檔案編碼應用程式偵聽器)
# 應用程式使用的預期字元編碼。
spring.mandatory-file-encoding= 


# 輸出
# 配置ANSI輸出(可以是“detect”,“always”,“never”)-->“檢測”,“永遠”,“從不”
spring.output.ansi.enabled= detect


# PID檔案(應用程式檔案寫入器)
# 如果使用ApplicationPidFileWriter但是無法寫入PID檔案,則失敗。
spring.pid.fail-on-write-error= 
# 要寫入的PID檔案的位置(如果使用ApplicationPidFileWriter)。
spring.pid.file= 


#   簡介(profiles 這個單詞翻譯過來就是這樣... 沒用過這個屬性,有哪位大神用過請留言我改正,感謝。)
# 活動配置檔案的逗号分隔清單。
spring.profiles.active= 
# 無條件地激活指定的逗号分隔的配置檔案。
spring.profiles.include= 


# SendGrid(SendGrid自動配置)
# SendGrid帳号使用者名
spring.sendgrid.username= 
# SendGrid帳号密碼
spring.sendgrid.password= 
# SendGrid代理主機
spring.sendgrid.proxy.host= 
# SendGrid代理端口
spring.sendgrid.proxy.port= 


# ----------------------------------------
#   WEB屬性
# ----------------------------------------


# 檔案上傳屬性
# 啟用對檔案上傳的支援。
multipart.enabled= true
# 将檔案寫入磁盤後的門檻值。 值可以使用字尾“MB”或“KB”表示兆位元組或千位元組大小。
multipart.file-size-threshold= 0
# 上傳檔案的位置。
multipart.location= 
# 最大檔案大小。 值可以使用字尾“MB”或“KB”表示兆位元組或千位元組大小。
multipart.max-file-size= 1Mb
# 最大請求大小。 值可以使用字尾“MB”或“KB”表示兆位元組或千位元組大小。
multipart.max-request-size= 10Mb


# 嵌入式伺服器配置(伺服器屬性)
# 伺服器應綁定到的網絡位址。
server.address= 
# 如果啟用響應壓縮。
server.compression.enabled= false
# 從壓縮中排除的使用者代理清單。
server.compression.excluded-user-agents= 
# 應該壓縮的MIME類型的逗号分隔清單。 例如`text / html,text / css,application / json`
server.compression.mime-types= 
# 執行壓縮所需的最小響應大小。 例如2048
server.compression.min-response-size= 
# Servlet上下文初始化參數。 例如`server.context-parameters.a =  alpha`
server.context-parameters.*= 
# 應用程式的上下文路徑。
server.context-path= 
# 顯示應用程式的名稱。
server.display-name= application
# 何時包含“stacktrace”屬性。
server.error.include-stacktrace= never
# 錯誤控制器的路徑。
server.error.path= /error
# 啟動浏覽器中出現伺服器錯誤時顯示的預設錯誤頁面。
server.error.whitelabel.enabled= true
# JSP servlet的類名。
server.jsp-servlet.class-name= org.apache.jasper.servlet.JspServlet
# Init參數用于配置JSP servlet
server.jsp-servlet.init-parameters.*= 
# JSP servlet是否被注冊
server.jsp-servlet.registered= true
# 伺服器HTTP端口。
server.port= 8080
# 主排程程式servlet的路徑。
server.servlet-path= /
# 會話cookie的注釋。
server.session.cookie.comment= 
# 會話cookie的域。
server.session.cookie.domain= 
# “HttpOnly”标志為會話cookie。
server.session.cookie.http-only= 
# 會話cookie的最大時長(以秒為機關)。
server.session.cookie.max-age= 
# 會話cookie名稱。
server.session.cookie.name= 
# 會話cookie的路徑。
server.session.cookie.path= 
# 會話cookie的“安全”标志。
server.session.cookie.secure= 
# 重新開機之間持續會話資料。
server.session.persistent= false
# 用于存儲會話資料的目錄。
server.session.store-dir= 
# 會話逾時(秒)。
server.session.timeout= 
# 會話跟蹤模式(以下一個或多個:“cookie”,“url”,“ssl”)。
server.session.tracking-modes= 
# 支援SSL密碼。
server.ssl.ciphers= 
# 用戶端認證是否需要(“want”)或需要(“need”)。 需要信任存儲。
server.ssl.client-auth= 
# ssl配置
server.ssl.enabled= 
server.ssl.key-alias= 
server.ssl.key-password= 
server.ssl.key-store= 
server.ssl.key-store-password= 
server.ssl.key-store-provider= 
server.ssl.key-store-type= 
server.ssl.protocol= 
server.ssl.trust-store= 
server.ssl.trust-store-password= 
server.ssl.trust-store-provider= 
server.ssl.trust-store-type= 
# 建立日志檔案的目錄。 可以相對于tomcat base dir或absolute。
server.tomcat.accesslog.directory= 
# 啟用通路日志。
server.tomcat.accesslog.enabled= false
# 通路日志的格式化模式。
server.tomcat.accesslog.pattern= common
# 日志檔案名字首。
server.tomcat.accesslog.prefix= access_log
# 日志檔案名字尾。
server.tomcat.accesslog.suffix= .log
# 在調用backgroundProcess方法之間延遲秒。
server.tomcat.background-processor-delay= 30
# Tomcat基本目錄。 如果未指定,将使用臨時目錄。
server.tomcat.basedir= 
# 正規表達式比對可信IP位址。
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}
# HTTP消息頭的最大大小(以位元組為機關)。
server.tomcat.max-http-header-size= 0
# 最大工作線程數。
server.tomcat.max-threads= 0
# 用于覆寫原始端口值的HTTP頭的名稱。
server.tomcat.port-header= X-Forwarded-Port
# 頭檔案,儲存傳入協定,通常命名為“X-Forwarded-Proto”。
server.tomcat.protocol-header= 
# 表示傳入請求使用SSL的協定頭的值。
server.tomcat.protocol-header-https-value= https
# 提取遠端ip的HTTP頭的名稱。 例如`X-FORWARDED-FOR`
server.tomcat.remote-ip-header= 
# 用于解碼URI的字元編碼。
server.tomcat.uri-encoding= UTF-8
# 通路日志目錄。
server.undertow.accesslog.dir= 
# 啟用通路日志。
server.undertow.accesslog.enabled= false
# 通路日志的格式化模式。
server.undertow.accesslog.pattern= common
# 每個緩沖區的大小位元組數。
server.undertow.buffer-size= 
# 每個區域的緩沖區數。
server.undertow.buffers-per-region= 
# 在Java堆之外配置設定緩沖區。
server.undertow.direct-buffers= 
# 為工作者建立的I / O線程數。
server.undertow.io-threads= 
# 工作線程數。
server.undertow.worker-threads= 
# 如果X-Forwarded- *頭應該應用于HttpRequest。
server.use-forward-headers= 


# 自由标記(自由标記自動配置)
# 設定是否允許HttpServletRequest屬性重寫(隐藏)控制器生成的同名模型屬性。
spring.freemarker.allow-request-override= false
# 設定是否允許HttpSession屬性重寫(隐藏)控制器生成的相同名稱的模型屬性。
spring.freemarker.allow-session-override= false
# 啟用模闆緩存。
spring.freemarker.cache= false
# 模闆編碼。
spring.freemarker.charset= UTF-8
# 檢查模闆位置是否存在。
spring.freemarker.check-template-location= true
# Content-Type值。
spring.freemarker.content-type= text/html
# 啟用此技術的MVC視圖分辨率。
spring.freemarker.enabled= true
# 設定在與模闆合并之前是否應将所有請求屬性添加到模型中。
spring.freemarker.expose-request-attributes= false
# 設定在與模闆合并之前是否應将所有HttpSession屬性添加到模型中。
spring.freemarker.expose-session-attributes= false
# 設定是否公開一個RequestContext供Spring 的宏庫使用,名稱為“springMacroRequestContext”。
spring.freemarker.expose-spring-macro-helpers= true
# 首選檔案系統通路模闆加載。 檔案系統通路可以對模闆更改進行熱檢測。
spring.freemarker.prefer-file-system-access= true
# 字首,在建構URL時先檢視名稱。
spring.freemarker.prefix= 
# 所有視圖的RequestContext屬性的名稱。
spring.freemarker.request-context-attribute= 
# 公開的FreeMarker密鑰将被傳遞給FreeMarker的配置。
spring.freemarker.settings.*= 
# 字尾,在建構URL時附加到檢視名稱。
spring.freemarker.suffix= 
# 逗号分隔的模闆路徑清單。
spring.freemarker.template-loader-path= classpath:/templates/
# 可以解決的視圖名稱的白名單。
spring.freemarker.view-names= 


# groovr模闆(Groovy模闆自動配置)
# 設定是否允許HttpServletRequest屬性重寫(隐藏)控制器生成的同名模型屬性。
spring.groovy.template.allow-request-override= false
# 設定是否允許HttpSession屬性重寫(隐藏)控制器生成的相同名稱的模型屬性。
spring.groovy.template.allow-session-override= false
# 啟用模闆緩存。
spring.groovy.template.cache= 
# 模闆編碼。
spring.groovy.template.charset= UTF-8
# 檢查模闆位置是否存在。
spring.groovy.template.check-template-location= true
# 請參閱GroovyMarkupConfigurer
spring.groovy.template.configuration.*= 
# Content-Type值。
spring.groovy.template.content-type= test/html
# 啟用此技術的MVC視圖分辨率。
spring.groovy.template.enabled= true
# 設定在與模闆合并之前是否應将所有請求屬性添加到模型中。
spring.groovy.template.expose-request-attributes= false
# 設定在與模闆合并之前是否應将所有HttpSession屬性添加到模型中。
spring.groovy.template.expose-session-attributes= false
# 設定是否公開一個RequestContext供Spring Spring的宏庫使用,名稱為“springMacroRequestContext”。
spring.groovy.template.expose-spring-macro-helpers= true
# 字首,在建構URL時先檢視名稱。
spring.groovy.template.prefix= 
# 所有視圖的RequestContext屬性的名稱。
spring.groovy.template.request-context-attribute= 
# 模闆路徑。
spring.groovy.template.resource-loader-path= classpath:/templates/
# 字尾,在建構URL時附加到檢視名稱。
spring.groovy.template.suffix= .tpl
# 可以解決的視圖名稱的白名單。
spring.groovy.template.view-names= 


# spring Hateoas 配置
# 指定應用程式/ hal + json響應是否應發送到接受application / json的請求。
spring.hateoas.use-hal-as-default-json-media-type= true


# HTTP 消息轉換
# 首選JSON映射程式用于HTTP消息轉換。 設定為“gson”強制使用Gson,當它和Jackson都在類路徑上時。
spring.http.converters.preferred-json-mapper= jackson


# HTTP 編碼(Http編碼屬性)
# HTTP請求和響應的字元集。 如果未明确設定,則添加到“Content-Type”頭。
spring.http.encoding.charset= UTF-8
# 啟用http編碼支援。
spring.http.encoding.enabled= true
# 将編碼強制到HTTP請求和響應上配置的字元集。
spring.http.encoding.force= true


# Jackson(解析json和序列化json) 配置
# 日期格式字元串或全限定日期格式類名。 例如`yyyy-MM-dd HH:mm:ss`。
spring.jackson.date-format= 
# Jones開/關功能,影響Java對象反序列化的方式。
spring.jackson.deserialization.*= 
# 關閉或者打開Jackson 功能
spring.jackson.generator.*= 
# Joda日期時間格式字元串。 如果未配置,如果配置了格式字元串,則“日期格式”将用作後備。
spring.jackson.joda-date-time-format= 
# 用于格式化的區域設定。
spring.jackson.locale= 
# jackson通用開/關功能。
spring.jackson.mapper.*= 
# Jackson 解析器的開/關功能。
spring.jackson.parser.*= 
# Jackson的PropertyNamingStrategy的一個常量。 也可以是PropertyNamingStrategy子類的完全限定類名。
spring.jackson.property-naming-strategy= 
# Jones開/關功能,影響Java對象序列化的方式。
spring.jackson.serialization.*= 
# 控制在序列化期間包含屬性。 配置了Jackson的JsonInclude.Include枚舉中的一個值。
spring.jackson.serialization-inclusion= 
# 格式化日期時使用的時區。 例如`America / Los_Angeles`
spring.jackson.time-zone= 


# Jersey 配置
# 作為應用程式的基本URI的路徑。 如果指定,則覆寫“@ApplicationPath”的值。
spring.jersey.application-path= 
# jersey過濾器鍊順序。
spring.jersey.filter.order= 0
#  init參數傳遞到Jersey通過servlet或過濾器。
spring.jersey.init.*= 
# jersey整合型。可以是“servlet”也可以是“filter”。
spring.jersey.type= servlet


# spring 視圖分解器 配置
# 啟用後退解析支援。
spring.mobile.devicedelegatingviewresolver.enable-fallback= false
# 啟用裝置視圖解析器。
spring.mobile.devicedelegatingviewresolver.enabled= false
# 字首,用于檢視移動裝置的名稱。
spring.mobile.devicedelegatingviewresolver.mobile-prefix= mobile/
# 字尾,附加到檢視移動裝置的名稱。
spring.mobile.devicedelegatingviewresolver.mobile-suffix= 
# 字首,用于檢視普通裝置的名稱。
spring.mobile.devicedelegatingviewresolver.normal-prefix= 
# 字尾,附加到檢視普通裝置的名稱。
spring.mobile.devicedelegatingviewresolver.normal-suffix= 
# 字首,用于檢視平闆裝置的名稱。
spring.mobile.devicedelegatingviewresolver.tablet-prefix= tablet/
# 字尾,附加到檢視平闆電腦裝置的名稱。
spring.mobile.devicedelegatingviewresolver.tablet-suffix= 


# 移動網站首選項 (站點首選項自動配置)
# 啟用SitePreferenceHandler。
spring.mobile.sitepreference.enabled= true


# MUSTACHE模闆(Mustache AutoConfiguration)
# 啟用模闆緩存。
spring.mustache.cache= false
# 模闆編碼。
spring.mustache.charset= UTF-8
# 檢查模闆位置是否存在。
spring.mustache.check-template-location= true
# Content-Type值
spring.mustache.content-type= text/html
# 啟用此技術的MVC視圖分辨率。
spring.mustache.enabled= true
# 字首應用于模闆名稱。
spring.mustache.prefix= classpath:/templates/
# 字尾應用于模闆名稱。
spring.mustache.suffix= .html
# 可以解決的視圖名稱的白名單。
spring.mustache.view-names= 


# SPRING MVC (Web Mvc 配置)
# 異步請求處理逾時之前的時間量(以毫秒為機關)。
spring.mvc.async.request-timeout= 
# 要使用的日期格式。 例如`dd / MM / yyyy`。
spring.mvc.date-format= 
# 發送TRACE請求到FrameworkServlet doService方法。
spring.mvc.dispatch-trace-request= false
# 發送OPTIONS請求到FrameworkServlet doService方法。
spring.mvc.dispatch-options-request= false
# 啟用favicon.ico的解析。
spring.mvc.favicon.enabled= true
# 如果在重定向方案期間應該忽略“預設”模型的内容。
spring.mvc.ignore-default-model-on-redirect= true
# 要使用的區域設定。
spring.mvc.locale= 
# 将檔案擴充名映射到内容協商的媒體類型。
spring.mvc.media-types.*= 
# 消息代碼格式政策。 例如`PREFIX_ERROR_CODE`。
spring.mvc.message-codes-resolver-format= 
# 用于靜态資源的路徑模式。
spring.mvc.static-path-pattern= /**
# 如果沒有發現處理程式來處理請求,則應抛出“NoHandlerFoundException”。
spring.mvc.throw-exception-if-no-handler-found= false
# Spring MVC視圖字首。
spring.mvc.view.prefix= 
# Spring MVC視圖字尾。
spring.mvc.view.suffix= 


 #SPRING RESOURCES HANDLING(ResourceProperties)資源處理
spring.resources.add-mappings = true #啟用預設資源處理。
spring.resources.cache-period = #由資源處理程式提供的資源的緩存期,以秒為機關。
spring.resources.chain.cache = true #在資源鍊中啟用緩存。
spring.resources.chain.enabled = #啟用Spring資源處理鍊。預設情況下禁用,除非啟用了至少一個政策。
spring.resources.chain.html-application-cache = false #啟用HTML5應用程式緩存清單重寫。
spring.resources.chain.strategy.content.enabled = false #啟用内容版本政策。
spring.resources.chain.strategy.content.paths = / ** #應用于版本政策的模式的逗号分隔清單。
spring.resources.chain.strategy.fixed.enabled = false #啟用固定版本政策。
spring.resources.chain.strategy.fixed.paths = #應用于版本政策的逗号分隔的模式清單。
spring.resources.chain.strategy.fixed.version = #用于版本政策的版本字元串。
spring.resources.static-locations = classpath:/ META-INF / resources /,classpath:/ resources /,classpath:/ static /,classpath:/ public / #靜态資源的位置。


 #SPRING SOCIAL(SocialWebAutoConfiguration)叢集
spring.social.auto-connection-views = false #啟用支援的提供程式的連接配接狀态視圖。


 #SPRING SOCIAL FACEBOOK(FacebookAutoConfiguration)
spring.social.facebook.app-id = #您的應用程式的Facebook應用程式ID
spring.social.facebook.app-secret = #你的應用程式的Facebook應用程式密碼


 #SPRING SOCIAL LINKEDIN(LinkedInAutoConfiguration)
spring.social.linkedin.app-id = #您的應用程式的LinkedIn應用程式ID
spring.social.linkedin.app-secret = #您的應用程式的LinkedIn App Secret


 #SPRING SOCIAL TWITTER(TwitterAutoConfiguration)
spring.social.twitter.app-id = #你的應用程式的Twitter應用程式ID
spring.social.twitter.app-secret = #你的應用程式的Twitter App Secret


 #THYMELEAF Thymeleaf模闆引擎配置
spring.thymeleaf.cache = true #啟用模闆緩存。
spring.thymeleaf.check-template-location = true #檢查模闆位置是否存在。
spring.thymeleaf.content-type = text / html #Content-Type值。
spring.thymeleaf.enabled = true #啟用MVC Thymeleaf視圖分辨率。
spring.thymeleaf.encoding = UTF-8 #模闆編碼。
spring.thymeleaf.excluded-view-names = #應該從解決方案中排除的視圖名稱的逗号分隔清單。
spring.thymeleaf.mode = HTML5 #應用于模闆的模闆模式。另請參見StandardTemplateModeHandlers。
spring.thymeleaf.prefix = classpath:/ templates / #在建構URL時預先檢視名稱的字首。
spring.thymeleaf.suffix = .html #建構URL時附加檢視名稱的字尾。
spring.thymeleaf.template-resolver-order = #鍊中模闆解析器的順序。
spring.thymeleaf.view-names = #可以解析的視圖名稱的逗号分隔清單。


 #VELOCITY TEMPLATES(VelocityAutoConfiguration)
spring.velocity.allow-request-override = false #設定是否允許HttpServletRequest屬性覆寫(隐藏)控制器生成的同名的模型屬性。
spring.velocity.allow-session-override = false #設定是否允許HttpSession屬性重寫(隐藏)控制器生成的同名的模型屬性。
spring.velocity.cache = #啟用模闆緩存。
spring.velocity.charset = UTF-8 #模闆編碼。
spring.velocity.check-template-location = true #檢查模闆位置是否存在。
spring.velocity.content-type = text / html #Content-Type值。
spring.velocity.date-tool-attribute = #在視圖的Velocity上下文中公開的DateTool輔助對象的名稱。
spring.velocity.enabled = true #啟用此技術的MVC視圖分辨率。
spring.velocity.expose-request-attributes = false #設定在與模闆合并之前是否應将所有請求屬性添加到模型中。
spring.velocity.expose-session-attributes = false #設定在與模闆合并之前是否應将所有HttpSession屬性添加到模型中。
spring.velocity.expose-spring-macro-helpers = true #設定是否公開一個RequestContext供Spring Spring的宏庫使用,名稱為“springMacroRequestContext”。
spring.velocity.number-tool-attribute = #在視圖的Velocity上下文中公開的NumberTool幫助對象的名稱。
spring.velocity.prefer-file-system-access = true #首選檔案系統通路模闆加載。檔案系統通路可以對模闆更改進行熱檢測。
spring.velocity.prefix = #字首,用于在建構URL時檢視名稱。
spring.velocity.properties。* = #附加速度屬性。
spring.velocity.request-context-attribute = #所有視圖的RequestContext屬性的名稱。
spring.velocity.resource-loader-path = classpath:/ templates / #模闆路徑。
spring.velocity.suffix = .vm #建構URL時附加到檢視名稱的字尾。
spring.velocity.toolbox-config-location = #Velocity Toolbox配置位置。例如`/ WEB-INF / toolbox.xml'
spring.velocity.view-names = #可以解決的視圖名稱的白名單。






 #----------------------------------------
 #安全屬性
 #----------------------------------------
 #SECURITY(SecurityProperties)
security.basic.authorize-mode = role #應用安全授權模式。
security.basic.enabled = true #啟用基本身份驗證。
security.basic.path = / ** #安全路徑的逗号分隔清單。
security.basic.realm = Spring #HTTP基本的領域名稱。
security.enable-csrf = false #啟用跨站點請求僞造支援。
security.filter-order = 0 #安全過濾器連鎖訂單。
security.headers.cache = true #啟用緩存控制HTTP頭。
security.headers.content-type = true# 啟用“X-Content-Type-Options”頭。
security.headers.frame = true #啟用“X-Frame-Options”标題。
security.headers.hsts = # HTTP嚴格傳輸安全(HSTS)模式(無,域,全部)。
security.headers.xss = true #啟用跨站點腳本(XSS)保護。
security.ignored = #從預設安全路徑中排除的路徑的逗号分隔清單。
security.require-ssl = false #為所有請求啟用安全通道。
security.sessions = stateless #會話建立政策(永遠不會,if_required,無狀态)。
security.user.name = user #預設使用者名。
security.user.password = #預設使用者名的密碼。預設情況下,啟動時會記錄随機密碼。
security.user.role = USER #為預設使用者名授予角色。


 #SECURITY OAUTH2 CLIENT(OAuth2ClientProperties
security.oauth2.client.client-id = #OAuth2用戶端ID。
security.oauth2.client.client-secret = #OAuth2客戶機密碼。預設生成随機密碼


 #SECURITY OAUTH2 RESOURCES(ResourceServerProperties
security.oauth2.resource.id = #資源的辨別符。
security.oauth2.resource.jwt.key-uri = #JWT令牌的URI。如果值不可用并且密鑰是公共的,可以設定。
security.oauth2.resource.jwt.key-value = #JWT令牌的驗證密鑰。可以是對稱秘密或PEM編碼的RSA公鑰。
security.oauth2.resource.prefer-token-info = true #使用令牌資訊,可以設定為false以使用使用者資訊。
security.oauth2.resource.service-id = resource #
security.oauth2.resource.token-info-uri = #令牌解碼端點的URI。
security.oauth2.resource.token-type = #使用userInfoUri時發送的令牌類型。
security.oauth2.resource.user-info-uri = #使用者端點的URI。


 #SECURITY OAUTH2 SSO(OAuth2SsoProperties
security.oauth2.sso.filter-order = #如果不提供顯式的WebSecurityConfigurerAdapter,則應用過濾器順序
security.oauth2.sso.login-path = / login #登入頁面的路徑,即觸發重定向到OAuth2授權伺服器的路徑




# ----------------------------------------
# DATA PROPERTIES 資料性能
# ----------------------------------------


# FLYWAY (FlywayProperties)
flyway.baseline-description = #
flyway.baseline-version = 1 #版本開始遷移
flyway.baseline-on-migrate = #
flyway.check-location = false #檢查遷移腳本位置是否存在。
flyway.clean-on-validation-error = #
flyway.enabled = true #啟用飛行路線。
flyway.encoding = #
flyway.ignore-failed-future-migration = #
flyway.init-sqls = #執行SQL語句,以便在擷取連接配接後立即初始化連接配接。
flyway.locations = classpath:db / migration #遷移腳本的位置
flyway.out-of-order = #如果您希望Flyway建立自己的DataSource,則需要使用#path密碼
flyway.placeholder-prefix = #
flyway.placeholder-replacement = #
flyway.placeholder-suffix = #
flyway.placeholders。* = #
flyway.schemas = #schemas來更新
flyway.sql-migration-prefix = V #
flyway.sql-migration-separator = #
flyway.sql-migration-suffix = .sql #
flyway.table = #
flyway.url = #要遷移的資料庫的JDBC url。如果未設定,則使用主配置的資料源。
flyway.user = #登入要遷移的資料庫的使用者。
flyway.validate-on-migrate = #


# LIQUIBASE (LiquibaseProperties)
liquibase.change-log = classpath:/db/changelog/db.changelog-master.yaml #更改日志配置路徑。
liquibase.check-change-log-location = true #檢查更改日志位置是否存在。
liquibase.contexts = #使用逗号分隔的運作時上下文清單。
liquibase.default-schema = #預設資料庫模式。
liquibase.drop-first = false #首先删除資料庫模式。
liquibase.enabled = true #啟用liquidibase支援。
liquibase.labels = #使用逗号分隔的運作時标簽清單。
liquibase.parameters。* = #更改日志參數。
liquibase.password = #登入要遷移的資料庫的密碼。
liquibase.url = #要遷移的資料庫的JDBC url。 如果未設定,則使用主配置的資料源。
liquibase.user = #登入要遷移的資料庫的使用者。



# DAO (PersistenceExceptionTranslationAutoConfiguration)
spring.dao.exceptiontranslation.enabled= true # 啟用持久異常翻譯後處理器。


# CASSANDRA (CassandraProperties)
spring.data.cassandra.cluster-name = #Cassandra群集的名稱。
spring.data.cassandra.compression = #由Cassandra二進制協定支援的壓縮。
spring.data.cassandra.connect-timeout-millis = #套接字選項:連接配接逾時。
spring.data.cassandra.consistency-level = #查詢一緻性級别。
spring.data.cassandra.contact-points = localhost #叢集節點位址的逗号分隔清單。
spring.data.cassandra.fetch-size = #查詢預設的抓取大小。
spring.data.cassandra.keyspace-name = #要使用的密鑰空間名稱。
spring.data.cassandra.load-balancing-policy = #負載均衡政策的類名。
spring.data.cassandra.port = #Cassandra伺服器端口。
spring.data.cassandra.password = #登入伺服器的密碼。
spring.data.cassandra.read-timeout-millis = #套接字選項:讀取逾時。
spring.data.cassandra.reconnection-policy = #重新連接配接政策類。
spring.data.cassandra.retry-policy = #重試政策的類名。
spring.data.cassandra.serial-consistency-level = #查詢串行一緻性級别。
spring.data.cassandra.ssl = false #啟用SSL支援。
spring.data.cassandra.username = #登入使用者的伺服器。


# ELASTICSEARCH (ElasticsearchProperties)
spring.data.elasticsearch.cluster-name = elasticsearch #彈性搜尋叢集名稱。
spring.data.elasticsearch.cluster-nodes = #叢集節點位址的逗号分隔清單。 如果未指定,則啟動用戶端節點。
spring.data.elasticsearch.properties。* = #用于配置用戶端的其他屬性。
spring.data.elasticsearch.repositories.enabled = true #啟用Elasticsearch存儲庫。


# MONGODB (MongoProperties)
spring.data.mongodb.authentication-database = #驗證資料庫名稱。
spring.data.mongodb.database = test #資料庫名稱。
spring.data.mongodb.field-naming-strategy = #要使用的FieldNamingStrategy的完全限定名稱。
spring.data.mongodb.grid-fs-database = #GridFS資料庫名稱。
spring.data.mongodb.host = localhost #Mongo伺服器主機。
spring.data.mongodb.password = #登入mongo伺服器的密碼。
spring.data.mongodb.port = 27017 #Mongo伺服器端口。
spring.data.mongodb.repositories.enabled = true #啟用Mongo存儲庫。
spring.data.mongodb.uri = mongodb:// localhost / test #Mongo資料庫URI。 設定時,主機和端口将被忽略。
spring.data.mongodb.username = #登入mongo伺服器的使用者。


# DATA REST (RepositoryRestProperties)
spring.data.rest.base-path = #由Spring Data REST用于公開存儲庫資源的基本路徑。
spring.data.rest.default-page-size = #頁面的預設大小。
spring.data.rest.enable-enum-translation = #通過Spring Data REST預設資源包啟用枚舉值轉換。
spring.data.rest.limit-param-name = #訓示一次傳回多少結果的URL查詢字元串參數的名稱。
spring.data.rest.max-page-size = #最大頁面大小。
spring.data.rest.page-param-name = #訓示要傳回的頁面的URL查詢字元串參數的名稱。
spring.data.rest.return-body-on-create = #建立一個實體後傳回響應體。
spring.data.rest.return-body-on-update = #更新實體後傳回響應體。
spring.data.rest.sort-param-name = #訓示排序結果的方向的URL查詢字元串參數的名稱。


# SOLR (SolrProperties)
spring.data.solr.host = http://127.0.0.1:8983/solr #Solr主機。 如果設定了“zk-host”,則被忽略。
spring.data.solr.repositories.enabled = true #啟用Solr存儲庫。
spring.data.solr.zk-host = #ZooKeeper主機位址,格式為HOST:PORT。


# 資料源 配置 (DataSourceAutoConfiguration & DataSourceProperties)
spring.datasource.continue-on-error = false #初始化資料庫時發生錯誤時不要停止。
spring.datasource.data = #Data(DML)腳本資源引用。
spring.datasource.driver-class-name = #JDBC驅動程式的完全限定名稱。預設情況下,根據URL自動檢測。
spring.datasource.initialize = true #使用'data.sql'填充資料庫。
spring.datasource.jmx-enabled = false #啟用JMX支援(如果由底層池提供)。
spring.datasource.jndi-name = #資料源的JNDI位置。設定時,類,網址,使用者名和密碼将被忽略。
spring.datasource.max-active = #例如100
spring.datasource.max-idle = #例如8
spring.datasource.max等待=
spring.datasource.min-evictable空閑時間-米利斯=
spring.datasource.min-idle = 8
spring.datasource.name = testdb #資料源的名稱。
spring.datasource.password = #登入資料庫的密碼。
spring.datasource.platform = all #在資源模式(schema - $ {platform} .sql)中使用的平台。
spring.datasource.schema = #Schema(DDL)腳本資源引用。
spring.datasource.separator =;  #語句分隔符在SQL初始化腳本中。
spring.datasource.sql-script-encoding = #SQL腳本編碼。
spring.datasource.test-on-borrow = #例如`false`
spring.datasource.test-on-return = #例如`false`
spring.datasource.test-while-idle = #
spring.datasource.time-between-eviction-runs-millis = 1
spring.datasource.type = #要使用的連接配接池實作的完全限定名稱。預設情況下,它是從類路徑自動檢測的。
spring.datasource.url = #資料庫的JDBC url。
spring.datasource.username= 
spring.datasource.validation-query= 


# H2 Web Console (H2ConsoleProperties)  
spring.h2.console.enabled = false #啟用控制台。
spring.h2.console.path = / h2-console #控制台可用的路徑。


# JOOQ (JooqAutoConfiguration)
spring.jooq.sql-dialect=  # 與配置的資料源通信時使用的SQLDialect JOOQ。 例如`POSTGRES`


# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
spring.data.jpa.repositories.enabled = true #啟用JPA存儲庫。
spring.jpa.database = #目标資料庫進行操作,預設情況下自動檢測。可以使用“databasePlatform”屬性設定。
spring.jpa.database-platform = #要運作的目标資料庫的名稱,預設情況下自動檢測。可以使用“資料庫”枚舉來設定。
spring.jpa.generate-ddl = false #啟動時初始化模式。
spring.jpa.hibernate.ddl-auto = #DDL模式。這實際上是“hibernate.hbm2ddl.auto”屬性的快捷方式。使用嵌入式資料庫時預設為“建立删除”,否則為“否”。
spring.jpa.hibernate.naming-strategy = #命名政策完全限定名。
spring.jpa.open-in-view = true #注冊OpenEntityManagerInViewInterceptor。将JPA EntityManager綁定到線程以進行請求的整個處理。
spring.jpa.properties。* = #在JPA提供程式上設定的其他本機屬性。
spring.jpa.show-sql = false #啟用SQL語句的日志記錄。


# JTA (JtaAutoConfiguration)
spring.jta。* = #技術特定配置
spring.jta.log-dir = #Transaction logs目錄。


# ATOMIKOS
spring.jta.atomikos.connectionfactory.borrow-connection-timeout = 30 #從池中借用連接配接的逾時(以秒為機關)。
spring.jta.atomikos.connectionfactory.ignore-session-transacted-flag = true #建立會話時是否忽略事務标志。
spring.jta.atomikos.connectionfactory.local-transaction-mode = false #是否需要本地事務。
spring.jta.atomikos.connectionfactory.maintenance-interval = 60 #池的維護線程運作之間的時間(以秒為機關)。
spring.jta.atomikos.connectionfactory.max-idle-time = 60 #從池中清除連接配接之後的時間(以秒為機關)。
spring.jta.atomikos.connectionfactory.max-lifetime = 0 #在被破壞之前可以将連接配接合并的時間(以秒為機關)。 0表示無限制。
spring.jta.atomikos.connectionfactory.max-pool-size = 1 #池的最大大小。
spring.jta.atomikos.connectionfactory.min-pool-size = 1 #池的最小大小。
spring.jta.atomikos.connectionfactory.reap-timeout = 0 #借用連接配接的收獲逾時(以秒為機關)。 0表示無限制。
spring.jta.atomikos.connectionfactory.unique-resource-name = jmsConnectionFactory #用于在恢複期間辨別資源的唯一名稱。
spring.jta.atomikos.datasource.borrow-connection-timeout = 30 #從池中借出連接配接的逾時(秒)。
spring.jta.atomikos.datasource.default-isolation-level = #池提供的連接配接的預設隔離級别。
spring.jta.atomikos.datasource.login-timeout = #用于建立資料庫連接配接的逾時(以秒為機關)。
spring.jta.atomikos.datasource.maintenance-interval = 60 #池的維護線程運作之間的時間(以秒為機關)。
spring.jta.atomikos.datasource.max-idle-time = 60 #從池中清除連接配接之後的時間(以秒為機關)。
spring.jta.atomikos.datasource.max-lifetime = 0 #在被破壞之前可以将連接配接合并的時間(以秒為機關)。 0表示無限制。
spring.jta.atomikos.datasource.max-pool-size = 1 #池的最大大小。
spring.jta.atomikos.datasource.min-pool-size = 1 #池的最小大小。
spring.jta.atomikos.datasource.reap-timeout = 0 #借用連接配接的收獲逾時(以秒為機關)。 0表示無限制。
spring.jta.atomikos.datasource.test-query = #用于在傳回連接配接之前驗證連接配接的SQL查詢或語句。
spring.jta.atomikos.datasource.unique-resource-name = dataSource #用于在恢複期間識别資源的唯一名稱。


# BITRONIX
spring.jta.bitronix.connectionfactory.acquire-increment = 1 #生成池時要建立的連接配接數。
spring.jta.bitronix.connectionfactory.acquisition-interval = 1 #在擷取無效連接配接後再次嘗試擷取連接配接之前等待的時間(以秒為機關)。
spring.jta.bitronix.connectionfactory.acquisition-timeout = 30 #從池中擷取連接配接的逾時(以秒為機關)。
spring.jta.bitronix.connectionfactory.allow-local-transactions = true #事務管理器是否允許混合XA和非XA事務。
spring.jta.bitronix.connectionfactory.apply-transaction-timeout = false #當XAResource被登記時,是否應該設定事務逾時。
spring.jta.bitronix.connectionfactory.automatic-enlisting-enabled = true #資源是否應該被自動登記和删除。
spring.jta.bitronix.connectionfactory.cache-producer-consumer = true #是否生産和消費者應該被緩存。
spring.jta.bitronix.connectionfactory.defer-connection-release = true #提供程式是否可以在同一連接配接上運作許多事務,并支援事務交織。
spring.jta.bitronix.connectionfactory.ignore-recovery-failures = false #是否應忽略恢複失敗。
spring.jta.bitronix.connectionfactory.max-idle-time = 60 #從池中清除連接配接之後的時間(以秒為機關)。
spring.jta.bitronix.connectionfactory.max-pool-size = 10 #池的最大大小。 0表示無限制。
spring.jta.bitronix.connectionfactory.min-pool-size = 0 #池的最小大小。
spring.jta.bitronix.connectionfactory.password = #用于連接配接到JMS提供程式的密碼。
spring.jta.bitronix.connectionfactory.share-transaction-connections = false #ACCESSIBLE狀态中的連接配接是否可以在事務的上下文中共享。
spring.jta.bitronix.connectionfactory.test-connections = true #從池中擷取連接配接是否應該進行測試。
spring.jta.bitronix.connectionfactory.two-pc-ordering-position = 1 #在兩階段送出期間該資源應該采取的位置(始終為Integer.MIN_VALUE,始終為Integer.MAX_VALUE)。
spring.jta.bitronix.connectionfactory.unique-name = jmsConnectionFactory #用于在恢複期間辨別資源的唯一名稱。
spring.jta.bitronix.connectionfactory.use-tm-join = true啟動XAResource時是否應使用TMJOIN。
spring.jta.bitronix.connectionfactory.user = #用于連接配接到JMS提供者的使用者。
spring.jta.bitronix.datasource.acquire-increment = 1 #生成池時要建立的連接配接數。
spring.jta.bitronix.datasource.acquisition-interval = 1 #在擷取無效連接配接後再嘗試擷取連接配接之前等待的時間(以秒為機關)。
spring.jta.bitronix.datasource.acquisition-timeout = 30 #從池中擷取連接配接的逾時(以秒為機關)。
spring.jta.bitronix.datasource.allow-local-transactions = true #事務管理器是否允許混合XA和非XA事務。
spring.jta.bitronix.datasource.apply-transaction-timeout = false #當XAResource被登記時,是否應該設定事務逾時。
spring.jta.bitronix.datasource.automatic-enlisting-enabled = true #資源是否應該被登記和自動删除。
spring.jta.bitronix.datasource.cursor-holdability = #連接配接的預設遊标保持性。
spring.jta.bitronix.datasource.defer-connection-release = true #資料庫是否可以在同一連接配接上運作許多事務,并支援事務交織。
spring.jta.bitronix.datasource.enable-jdbc4-connection-test = #從池中擷取連接配接時是否調用Connection.isValid()。
spring.jta.bitronix.datasource.ignore-recovery-failures = false #是否應忽略恢複失敗。
spring.jta.bitronix.datasource.isolation-level = #連接配接的預設隔離級别。
spring.jta.bitronix.datasource.local-auto-commit = #本地事務的預設自動送出模式。
spring.jta.bitronix.datasource.login-timeout = #用于建立資料庫連接配接的逾時(以秒為機關)。
spring.jta.bitronix.datasource.max-idle-time = 60 #從池中清除連接配接之後的時間(以秒為機關)。
spring.jta.bitronix.datasource.max-pool-size = 10 #池的最大大小。 0表示無限制。
spring.jta.bitronix.datasource.min-pool-size = 0 #池的最小大小。
spring.jta.bitronix.datasource.prepared-statement-cache-size = 0 #準備好的語句高速緩存的目标大小。 0禁用緩存。
spring.jta.bitronix.datasource.share-transaction-connections = false #ACCESSIBLE狀态下的連接配接是否可以在事務的上下文中共享。
spring.jta.bitronix.datasource.test-query = #用于在傳回連接配接之前驗證連接配接的SQL查詢或語句。
spring.jta.bitronix.datasource.two-pc-ordering-position = 1 #在兩階段送出期間該資源應該采取的位置(始終為Integer.MIN_VALUE,始終為Integer.MAX_VALUE)。
spring.jta.bitronix.datasource.unique-name = dataSource #用于在恢複期間辨別資源的唯一名稱。
spring.jta.bitronix.datasource.use-tm-join = true啟動XAResource時是否應使用TMJOIN。



# EMBEDDED MONGODB (EmbeddedMongoProperties)
spring.mongodb.embedded.features = SYNC_DELAY #啟用功能的逗号分隔清單。
spring.mongodb.embedded.version = 2.6.10 #Mongo使用版本。



# ----------------------------------------
# 整合屬性
# ----------------------------------------

 #ACTIVEMQ(ActiveMQProperties)
spring.activemq.broker-url = #ActiveMQ代理的URL。 預設自動生成。 例如`tcp:// localhost:61616`
spring.activemq.in-memory = true #指定預設代理URL是否應在記憶體中。 如果指定了一個顯式代理,則被忽略。
spring.activemq.password = #登入密碼的代理。
spring.activemq.pooled = false #指定是否建立PooledConnectionFactory而不是正常的ConnectionFactory。
spring.activemq.user = #代理登入使用者。


# ARTEMIS (ArtemisProperties)
spring.artemis.embedded.cluster-password = #群集密碼。 預設情況下随機生成。
spring.artemis.embedded.data-directory = #日志檔案目錄。 如果持久性被關閉,則不需要。
spring.artemis.embedded.enabled = true #如果Artemis伺服器API可用,啟用嵌入式模式。
spring.artemis.embedded.persistent = false #啟用持久存儲。
spring.artemis.embedded.queues = #啟動時要建立的隊列的逗号分隔清單。
spring.artemis.embedded.server-id = #伺服器ID。 預設情況下,使用自動遞增的計數器。
spring.artemis.embedded.topics = #啟動時要建立的主題的逗号分隔清單。
spring.artemis.host = localhost #Artemis代理主機。
spring.artemis.mode = #Artemis部署模式,預設情況下自動檢測。 可以顯式設定為“native”或“embedded”。
spring.artemis.port = 61616 #Artemis 中間件端口。


# SPRING BATCH(Batch 配置)
spring.batch.initializer.enabled = true #如果需要,在啟動時建立所需的批處理表。
spring.batch.job.enabled = true #在啟動時執行上下文中的所有Spring批處理作業。
spring.batch.job.names = #在啟動時執行的作業名稱的逗号分隔清單(例如`job1,job2`)。 預設情況下,執行在上下文中找到的所有作業。
spring.batch.schema = classpath:org / springframework / batch / core / schema - @@ platform @@。sql #用于初始化資料庫模式的SQL檔案的路徑。
spring.batch.table-prefix = #所有批次中繼資料表的表字首。


# HORNETQ (HornetQ 配置)
spring.hornetq.embedded.cluster-password = #叢集密碼。 預設情況下随機生成。
spring.hornetq.embedded.data-directory = #日志檔案目錄。 如果持久性被關閉,則不需要。
spring.hornetq.embedded.enabled = true #如果HornetQ伺服器API可用,啟用嵌入式模式。
spring.hornetq.embedded.persistent = false #啟用持久存儲。
spring.hornetq.embedded.queues = #啟動時要建立的隊列的逗号分隔清單。
spring.hornetq.embedded.server-id = #伺服器ID。 預設情況下,使用自動遞增的計數器。
spring.hornetq.embedded.topics = #在啟動時建立的主題的逗号分隔清單。
spring.hornetq.host = localhost #HornetQ代理主機。
spring.hornetq.mode = #HornetQ部署模式,預設情況下自動檢測。 可以顯式設定為“native”或“embedded”。
spring.hornetq.port = 5445 #HornetQ代理端口。


# JMS (Jms 配置)
# 連接配接工廠JNDI名稱。 設定時,優先于其他連接配接工廠自動配置。
spring.jms.jndi-name= 
# 容器的确認模式。 預設情況下,監聽器被自動确認處理。
spring.jms.listener.acknowledge-mode= 
# 啟動時自動啟動容器。
spring.jms.listener.auto-startup= true
# 最小并發消費者數。
spring.jms.listener.concurrency= 
# 最大并發消費者數。
spring.jms.listener.max-concurrency= 
# 指定預設的目的地類型是否為主題。
spring.jms.pub-sub-domain= false


# RABBIT (Rabbit 配置)
# 用戶端應連接配接到的逗号分隔的位址清單。
spring.rabbitmq.addresses = 
spring.rabbitmq.dynamic =  true # 建立一個AmqpAdmin bean。
spring.rabbitmq.host =  localhost# RabbitMQ主機。
spring.rabbitmq.listener.acknowledge-mode = # 容器的确認模式。
spring.rabbitmq.listener.auto-startup =  true# 啟動時自動啟動容器。
spring.rabbitmq.listener.concurrency = # 最少消費者數。
spring.rabbitmq.listener.max-concurrency = # 最大消費者數。
spring.rabbitmq.listener.prefetch = # 在單個請求中要處理的消息數。它應該大于或等于事務大小(如果使用)。
spring.rabbitmq.listener.transaction-size = # 在事務中要處理的消息數。為了獲得最佳結果,它應該小于或等于預取計數。
spring.rabbitmq.password = # 登入以對代理進行身份驗證。
spring.rabbitmq.port =  5672# RabbitMQ端口。
spring.rabbitmq.requested-heartbeat = # 請求的心跳逾時,以秒為機關;零為無。
spring.rabbitmq.ssl.enabled =  false# 啟用SSL支援。
spring.rabbitmq.ssl.key-store =  # 儲存SSL證書的密鑰存儲區的路徑。
spring.rabbitmq.ssl.key-store-password = # 用于通路密鑰庫的密碼。
spring.rabbitmq.ssl.trust-store = # 儲存SSL證書的Trust存儲。
spring.rabbitmq.ssl.trust-store-password = # 用于通路信任存儲的密碼。
spring.rabbitmq.username = # 登入使用者對代理進行身份驗證。
spring.rabbitmq.virtual-host = # 連接配接到代理時使用的虛拟主機。


# 端點配置(EndpointCorsProperties)
# 設定是否支援憑據。 未設定時,不支援憑據。
endpoints.cors.allow-credentials= 
# 在請求中允許的頭檔案逗号分隔清單。 '*'允許所有标題。
endpoints.cors.allowed-headers= 
# 逗号分隔的允許的方法清單。 '*'允許所有方法。
endpoints.cors.allowed-methods= GET
# 逗号分隔的起始清單允許。 '*'允許所有來源。 未設定時,禁用CORS支援。
endpoints.cors.allowed-origins= 
# 包含在響應中的标題的逗号分隔清單。
endpoints.cors.exposed-headers= 
# 用戶端可以緩存飛行前請求的響應時間(秒)。
endpoints.cors.max-age= 1800


# JMX ENDPOINT (EndpointMBeanExportProperties) (端點MBean導出屬性)
# JMX域名。 如果設定為'spring.jmx.default-domain'的值初始化。
endpoints.jmx.domain= 
# 啟用所有端點的JMX導出。
endpoints.jmx.enabled= true
# 附加靜态屬性以附加到表示端點的MBean的所有對象名稱。
endpoints.jmx.static-names= 
# 確定在發生沖突時修改ObjectNames。
endpoints.jmx.unique-names= false


# JOLOKIA  JOLOKIA 配置
# 見Jolokia手冊
jolokia.config.*= 


# 管理HTTP伺服器(管理伺服器屬性)
# 在每個響應中添加“X-Application-Context”HTTP頭。
management.add-application-context-header= true
# 管理端點應綁定到的網絡位址。
management.address= 
# 管理端點上下文路徑。 例如`/ actuator`
management.context-path= 
# 管理端點HTTP端口。 預設使用與應用程式相同的端口。
management.port= 
# 啟用安全性
management.security.enabled= true
# 通路管理端點所需的角色。
management.security.role= ADMIN
# 會話建立政策使用(always,never,if_required,stateless)(總是,永遠,if_required,無狀态)。
management.security.sessions= stateless


# HEALTH INDICATORS (previously health.*)
# 啟用資料庫運作狀況檢查
management.health.db.enabled= true
# 啟用預設的健康名額。
management.health.defaults.enabled= true
# 啟用磁盤空間運作狀況檢查。
management.health.diskspace.enabled= true
# 用于計算可用磁盤空間的路徑。
management.health.diskspace.path= 
# 應該可用的最小磁盤空間(以位元組為機關)。
management.health.diskspace.threshold= 0
# 啟用彈性搜尋健康檢查。
management.health.elasticsearch.enabled= true
# 逗号分隔的索引名稱。
management.health.elasticsearch.indices= 
# 等待群集響應的時間(以毫秒為機關)。
management.health.elasticsearch.response-timeout= 100
# 啟用JMS健康檢查。
management.health.jms.enabled= true
# 啟用郵件運作狀況檢查。
management.health.mail.enabled= true
# 啟用MongoDB健康檢查。
management.health.mongo.enabled= true
# 啟用RabbitMQ運作狀況檢查。
management.health.rabbit.enabled= true
# 啟用Redis健康檢查。
management.health.redis.enabled= true
# 啟用Solr運作狀況檢查。
management.health.solr.enabled= true
# 按照嚴重性的順序,以逗号分隔的健康狀态清單。
management.health.status.order= DOWN, OUT_OF_SERVICE, UNKNOWN, UP


# TRACING ((TraceProperties) 跟蹤性能
# 跟蹤中包含的項目。
management.trace.include= request-headers,response-headers,errors


# 遠端 shell配置
# 驗證類型。 根據環境自動檢測。
shell.auth= simple
# JAAS域。
shell.auth.jaas.domain= my-domain
# 驗證密鑰的路徑。 這應該指向一個有效的“.pem”檔案。
shell.auth.key.path= 
# 登入使用者。
shell.auth.simple.user.name= user
# 登入使用者的密碼。
shell.auth.simple.user.password= 
# 登入到CRaSH控制台的所需的角色,以逗号分隔清單。
shell.auth.spring.roles= ADMIN
# 用于查找指令的模式。
shell.command-path-patterns= classpath*:/commands/**,classpath*:/crash/commands/**
# 掃描更改并在必要時更新指令(以秒為機關)。
shell.command-refresh-interval= -1
# 用于查找配置的模式。
shell.config-path-patterns= classpath*:/crash/*
# 逗号分隔的要禁用的指令清單。
shell.disabled-commands= jpa*,jdbc*,jndi*
# 禁用逗号分隔的插件清單。 預設情況下,根據環境禁用某些插件。
shell.disabled-plugins= 
# 使用者被提示再次登入後的毫秒數。
shell.ssh.auth-timeout = 
# 啟用CRaSH SSH支援。
shell.ssh.enabled= true
# 未使用的連接配接關閉之後的毫秒數。
shell.ssh.idle-timeout = 
# SSH伺服器密鑰路徑。
shell.ssh.key-path= 
# SSH端口。
shell.ssh.port= 2000
# 啟用CRaSH telnet支援。 如果TelnetPlugin可用,預設情況下啟用。
shell.telnet.enabled= false
# Telnet端口。
shell.telnet.port= 5000


# GIT 資訊配置
# 生成的git資訊屬性檔案的資源引用。
spring.git.properties= 


# 标準出口
# 模式,告訴聚合器如何從源存儲庫中的鍵。
spring.metrics.export.aggregate.key-pattern= 
# 全局存儲庫的字首如果處于活動狀态。
spring.metrics.export.aggregate.prefix= 
# 導出刻度之間以毫秒為機關的延遲。 按照這種延遲,名額将按計劃導出到外部來源。
spring.metrics.export.delay-millis= 5000
# 标志以啟用度量标準導出(假設MetricWriter可用)。
spring.metrics.export.enabled= true
# 要排除的度量名稱清單。 應用後包括。
spring.metrics.export.excludes= 
# 要包含的度量名稱的模式清單。
spring.metrics.export.includes= 
# redis存儲庫導出的密鑰(如果活動)。
spring.metrics.export.redis.key= keys.spring.metrics
# redis存儲庫的字首 如果處于活動狀态。
spring.metrics.export.redis.prefix= spring.metrics
# 标志基于不導出不變的路徑成本來關閉任何可用的優化。
spring.metrics.export.send-latest= 
# 主機的statsd伺服器接收導出的名額。
spring.metrics.export.statsd.host= 
# 接收導出名額的statsd伺服器端口。
spring.metrics.export.statsd.port= 8125
# statsd導出名額的字首。
spring.metrics.export.statsd.prefix= 
# 每個MetricWriter bean名稱具有特定的觸發器屬性。
spring.metrics.export.triggers.*= 


# ----------------------------------------
# DEVTOOLS屬性
# ----------------------------------------

# DEVTOOLS(開發工具屬性)
# 啟用一個livereload.com相容的伺服器。
spring.devtools.livereload.enabled= true
#  # Server port.
spring.devtools.livereload.port= 35729
# 應該排除的觸發完全重新啟動的其他模式。
spring.devtools.restart.additional-exclude= 
# 觀看更改的附加路徑。
spring.devtools.restart.additional-paths= 
# 啟用自動重新開機功能。
spring.devtools.restart.enabled= true
# 應該排除的模式觸發完全重新啟動。
spring.devtools.restart.exclude= META-INF/maven/**,META-INF/resources/**,resources/**,static/**,public/**,templates/**,**/*Test.class,**/*Tests.class,git.properties
# 輪詢類路徑更改之間等待的時間量(以毫秒為機關)。
spring.devtools.restart.poll-interval= 1000
# 觸發重新啟動之前沒有任何類路徑更改所需的安靜時間量(以毫秒為機關)。
spring.devtools.restart.quiet-period= 400
# 更改後的特定檔案的名稱将觸發重新啟動檢查。 如果未指定任何類路徑檔案更改将觸發重新啟動。
spring.devtools.restart.trigger-file= 


# 遠端開發工具屬性
# 用于處理遠端連接配接的上下文路徑。
spring.devtools.remote.context-path= /.~~spring-boot!~
# 啟用遠端調試支援。
spring.devtools.remote.debug.enabled= true
# 本地遠端調試伺服器端口。
spring.devtools.remote.debug.local-port= 8000
# 用于連接配接到遠端應用程式的代理主機。
spring.devtools.remote.proxy.host= 
# 用于連接配接到遠端應用程式的代理端口。
spring.devtools.remote.proxy.port= 
# 啟用遠端重新開機。
spring.devtools.remote.restart.enabled= true
# 建立連接配接所需的共享密鑰(需要啟用遠端支援)。
spring.devtools.remote.secret= 
# HTTP頭用于傳輸共享密鑰。</ span>
spring.devtools.remote.secret-header-name= X-AUTH-TOKEN      

更多配置可以直接檢視官方文檔:

SpringBoot配置官方文檔

二、yml格式配置

這東西其實和properties差不多,知道有這麼個玩意就行了。

比如yml格式配置:

spring:
    mvc:
        view:
            prefix: /WEB-INF/jsp/
            suffix: .jsp
server:
    port: 8888
    context-path: /test      

對應的peoperties配置:

spring.mvc.view.prefix= /WEB-INF/jsp/
spring.mvc.view. suffix=.jsp
server.port=8888
server.context-path=/test
      

三、配置切換

一個項目可以寫多個配置檔案,

核心配置檔案:application.properties:

spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
spring.profiles.active=pro      

開發環境用的配置檔案:application-dev.properties

server.port=8080
server.context-path=/test      

生産環境用的配置檔案:application-pro.properties:

server.port=80
server.context-path=/      

那怎麼切換呢?

通過application.properties裡的spring.profiles.active來進行切換。

四、拓展——自定義屬性配置

這玩意兒就大概了解一下。

https://blog.csdn.net/forezp/article/details/70437576

參考:

【1】、

http://www.cnblogs.com/dsn727455218/p/9304490.html

【1】、

http://how2j.cn/k/springboot/springboot-yml/1645.html

【3】、

http://how2j.cn/k/springboot/springboot-switch-config/1644.html#nowhere