Spring Cloud 常用屬性文件配置總結(jié)

在我搭建基于Spring Cloud的微服務(wù)體系應(yīng)用的時(shí)候所需要或者是常用的屬性配置文件,還有這些屬性的用途,此配置大多數(shù)來(lái)自互聯(lián)網(wǎng),稍作整理,記錄再此,以便忘記的時(shí)候可以快速的檢索到,也方便其他人更加快的融入到這門(mén)技術(shù)中。

首先先來(lái)看一下基于Spring Boot項(xiàng)目的配置文件加載權(quán)重:

#1.啟動(dòng)時(shí)命令行里面?zhèn)魅氲膮?shù)

#2.SPRING_APPLICATION_JSON中的屬性

#3.java:comp/env 中的jndi屬性

#4.java的系統(tǒng)屬性 System.getProperties()

#5.操作系統(tǒng)的環(huán)境變量

#6.random.*配置的隨機(jī)屬性

#7.位于當(dāng)前jar之外的,針對(duì)不同環(huán)境的配置文件內(nèi)容

#8.位于當(dāng)前jar之內(nèi)的,針對(duì)不同環(huán)境的配置文件內(nèi)容

#9.位于當(dāng)前jar之外的,application.properties和YAML

#10.位于當(dāng)前jar之內(nèi)的,application.properties和YAML

#11.@configuration注解修改的類中通過(guò)@PropertySource注解定義的屬性

#12.應(yīng)用默認(rèn)屬性,使用SpringApplication.setDefaultProperties定義的內(nèi)容

以上這十二項(xiàng)權(quán)重依次遞減。在搭建項(xiàng)目的時(shí)候,如果遇到項(xiàng)目屬性配置值不是自己想要的,參照此順序進(jìn)行排查一般即可排除。



分割線--------------------------------------------------------------------------------------------------------------------------------------------分割線


下面進(jìn)入正題:

? ??????????????????????????????????????????????????????????server


server.address

指定server綁定的地址

server.compression.enabled

是否開(kāi)啟壓縮,默認(rèn)為false.

server.compression.excluded-user-agents

指定不壓縮的user-agent,多個(gè)以逗號(hào)分隔,默認(rèn)值為:text/html,text/xml,text/plain,text/css

server.compression.mime-types

指定要壓縮的MIME type,多個(gè)以逗號(hào)分隔.

server.compression.min-response-size

執(zhí)行壓縮的閾值,默認(rèn)為2048

server.context-parameters.[param name]

設(shè)置servlet context 參數(shù)

server.context-path

設(shè)定應(yīng)用的context-path.

server.display-name

設(shè)定應(yīng)用的展示名稱,默認(rèn): application

server.jsp-servlet.class-name

設(shè)定編譯JSP用的servlet,默認(rèn): org.apache.jasper.servlet.JspServlet

server.jsp-servlet.init-parameters.[param name]

設(shè)置JSP servlet 初始化參數(shù).

server.jsp-servlet.registered

設(shè)定JSP servlet是否注冊(cè)到內(nèi)嵌的servlet容器,默認(rèn)true

server.port

設(shè)定http監(jiān)聽(tīng)端口

server.servlet-path

設(shè)定dispatcher servlet的監(jiān)聽(tīng)路徑,默認(rèn)為: /

cookie、session配置

server.session.cookie.comment

指定session cookie的comment

server.session.cookie.domain

指定session cookie的domain

server.session.cookie.http-only

是否開(kāi)啟HttpOnly.

server.session.cookie.max-age

設(shè)定session cookie的最大age.

server.session.cookie.name

設(shè)定Session cookie 的名稱.

server.session.cookie.path

設(shè)定session cookie的路徑.

server.session.cookie.secure

設(shè)定session cookie的“Secure” flag.

server.session.persistent

重啟時(shí)是否持久化session,默認(rèn)false

server.session.timeout

session的超時(shí)時(shí)間

server.session.tracking-modes

設(shè)定Session的追蹤模式(cookie, url, ssl).

ssl配置

server.ssl.ciphers

是否支持SSL ciphers.

server.ssl.client-auth

設(shè)定client authentication是wanted 還是 needed.

server.ssl.enabled

是否開(kāi)啟ssl,默認(rèn): true

server.ssl.key-alias

設(shè)定key store中key的別名.

server.ssl.key-password

訪問(wèn)key store中key的密碼.

server.ssl.key-store

設(shè)定持有SSL certificate的key store的路徑,通常是一個(gè).jks文件.

server.ssl.key-store-password

設(shè)定訪問(wèn)key store的密碼.

server.ssl.key-store-provider

設(shè)定key store的提供者.

server.ssl.key-store-type

設(shè)定key store的類型.

server.ssl.protocol

使用的SSL協(xié)議,默認(rèn): TLS

server.ssl.trust-store

持有SSL certificates的Trust store.

server.ssl.trust-store-password

訪問(wèn)trust store的密碼.

server.ssl.trust-store-provider

設(shè)定trust store的提供者.

server.ssl.trust-store-type

指定trust store的類型.

tomcat

server.tomcat.access-log-enabled

是否開(kāi)啟access log ,默認(rèn): false)

server.tomcat.access-log-pattern

設(shè)定access logs的格式,默認(rèn): common

server.tomcat.accesslog.directory

設(shè)定log的目錄,默認(rèn): logs

server.tomcat.accesslog.enabled

是否開(kāi)啟access log,默認(rèn): false

server.tomcat.accesslog.pattern

設(shè)定access logs的格式,默認(rèn): common

server.tomcat.accesslog.prefix

設(shè)定Log 文件的前綴,默認(rèn): access_log

server.tomcat.accesslog.suffix

設(shè)定Log 文件的后綴,默認(rèn): .log

server.tomcat.background-processor-delay

后臺(tái)線程方法的Delay大小: 30

server.tomcat.basedir

設(shè)定Tomcat的base 目錄,如果沒(méi)有指定則使用臨時(shí)目錄.

server.tomcat.internal-proxies

設(shè)定信任的正則表達(dá)式,默認(rèn):“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}”

server.tomcat.max-http-header-size

設(shè)定http header的最小值,默認(rèn): 0

server.tomcat.max-threads

設(shè)定tomcat的最大工作線程數(shù),默認(rèn)為: 0

server.tomcat.port-header

設(shè)定http header使用的,用來(lái)覆蓋原來(lái)port的value.

server.tomcat.protocol-header

設(shè)定Header包含的協(xié)議,通常是 X-Forwarded-Proto,如果remoteIpHeader有值,則將設(shè)置為RemoteIpValve.

server.tomcat.protocol-header-https-value

設(shè)定使用SSL的header的值,默認(rèn)https.

server.tomcat.remote-ip-header

設(shè)定remote IP的header,如果remoteIpHeader有值,則設(shè)置為RemoteIpValve

server.tomcat.uri-encoding

設(shè)定URI的解碼字符集.

undertow

server.undertow.access-log-dir

設(shè)定Undertow access log 的目錄,默認(rèn): logs

server.undertow.access-log-enabled

是否開(kāi)啟access log,默認(rèn): false

server.undertow.access-log-pattern

設(shè)定access logs的格式,默認(rèn): common

server.undertow.accesslog.dir

設(shè)定access log 的目錄.

server.undertow.buffer-size

設(shè)定buffer的大小.

server.undertow.buffers-per-region

設(shè)定每個(gè)region的buffer數(shù)

server.undertow.direct-buffers

設(shè)定堆外內(nèi)存

server.undertow.io-threads

設(shè)定I/O線程數(shù).

server.undertow.worker-threads

設(shè)定工作線程數(shù)


? ??????????????????????????????????????????????????????????????????????mvc


spring.mvc.async.request-timeout

設(shè)定async請(qǐng)求的超時(shí)時(shí)間,以毫秒為單位,如果沒(méi)有設(shè)置的話,以具體實(shí)現(xiàn)的超時(shí)時(shí)間為準(zhǔn),比如tomcat的servlet3的話是10秒.

spring.mvc.date-format

設(shè)定日期的格式,比如dd/MM/yyyy.

spring.mvc.favicon.enabled

是否支持favicon.ico,默認(rèn)為: true

spring.mvc.ignore-default-model-on-redirect

在重定向時(shí)是否忽略默認(rèn)model的內(nèi)容,默認(rèn)為true

spring.mvc.locale

指定使用的Locale.

spring.mvc.message-codes-resolver-format

指定message codes的格式化策略(PREFIX_ERROR_CODE,POSTFIX_ERROR_CODE).

spring.mvc.view.prefix

指定mvc視圖的前綴.

spring.mvc.view.suffix

指定mvc視圖的后綴.

messages

spring.messages.basename

指定message的basename,多個(gè)以逗號(hào)分隔,如果不加包名的話,默認(rèn)從classpath路徑開(kāi)始,默認(rèn): messages

spring.messages.cache-seconds

設(shè)定加載的資源文件緩存失效時(shí)間,-1的話為永不過(guò)期,默認(rèn)為-1

spring.messages.encoding

設(shè)定Message bundles的編碼,默認(rèn): UTF-8

spring.mobile.devicedelegatingviewresolver.enable-fallback

是否支持fallback的解決方案,默認(rèn)false

spring.mobile.devicedelegatingviewresolver.enabled

是否開(kāi)始device view resolver,默認(rèn)為: false

spring.mobile.devicedelegatingviewresolver.mobile-prefix

設(shè)定mobile端視圖的前綴,默認(rèn)為:mobile/

spring.mobile.devicedelegatingviewresolver.mobile-suffix

設(shè)定mobile視圖的后綴

spring.mobile.devicedelegatingviewresolver.normal-prefix

設(shè)定普通設(shè)備的視圖前綴

spring.mobile.devicedelegatingviewresolver.normal-suffix

設(shè)定普通設(shè)備視圖的后綴

spring.mobile.devicedelegatingviewresolver.tablet-prefix

設(shè)定平板設(shè)備視圖前綴,默認(rèn):tablet/

spring.mobile.devicedelegatingviewresolver.tablet-suffix

設(shè)定平板設(shè)備視圖后綴.

spring.mobile.sitepreference.enabled

是否啟用SitePreferenceHandler,默認(rèn)為: true

spring.view.prefix

設(shè)定mvc視圖的前綴.

spring.view.suffix

設(shè)定mvc視圖的后綴.

spring.resources.add-mappings

是否開(kāi)啟默認(rèn)的資源處理,默認(rèn)為true

spring.resources.cache-period

設(shè)定資源的緩存時(shí)效,以秒為單位.

spring.resources.chain.cache

是否開(kāi)啟緩存,默認(rèn)為: true

spring.resources.chain.enabled

是否開(kāi)啟資源 handling chain,默認(rèn)為false

spring.resources.chain.html-application-cache

是否開(kāi)啟h5應(yīng)用的cache manifest重寫(xiě),默認(rèn)為: false

spring.resources.chain.strategy.content.enabled

是否開(kāi)啟內(nèi)容版本策略,默認(rèn)為false

spring.resources.chain.strategy.content.paths

指定要應(yīng)用的版本的路徑,多個(gè)以逗號(hào)分隔,默認(rèn)為:[/**]

spring.resources.chain.strategy.fixed.enabled

是否開(kāi)啟固定的版本策略,默認(rèn)為false

spring.resources.chain.strategy.fixed.paths

指定要應(yīng)用版本策略的路徑,多個(gè)以逗號(hào)分隔

spring.resources.chain.strategy.fixed.version

指定版本策略使用的版本號(hào)

spring.resources.static-locations

指定靜態(tài)資源路徑,默認(rèn)為classpath:[/META-INF/resources/,/resources/, /static/, /public/]以及context:/

multipart.enabled

是否開(kāi)啟文件上傳支持,默認(rèn)為true

multipart.file-size-threshold

設(shè)定文件寫(xiě)入磁盤(pán)的閾值,單位為MB或KB,默認(rèn)為0

multipart.location

指定文件上傳路徑.

multipart.max-file-size

指定文件大小最大值,默認(rèn)1MB

multipart.max-request-size

指定每次請(qǐng)求的最大值,默認(rèn)為10MB

spring.freemarker.allow-request-override

指定HttpServletRequest的屬性是否可以覆蓋controller的model的同名項(xiàng)

spring.freemarker.allow-session-override

指定HttpSession的屬性是否可以覆蓋controller的model的同名項(xiàng)

spring.freemarker.cache

是否開(kāi)啟template caching.

spring.freemarker.charset

設(shè)定Template的編碼.

spring.freemarker.check-template-location

是否檢查templates路徑是否存在.

spring.freemarker.content-type

設(shè)定Content-Type.

spring.freemarker.enabled

是否允許mvc使用freemarker.

spring.freemarker.expose-request-attributes

設(shè)定所有request的屬性在merge到模板的時(shí)候,是否要都添加到model中.

spring.freemarker.expose-session-attributes

設(shè)定所有HttpSession的屬性在merge到模板的時(shí)候,是否要都添加到model中.

spring.freemarker.expose-spring-macro-helpers

設(shè)定是否以springMacroRequestContext的形式暴露RequestContext給Spring’s macro library使用

spring.freemarker.prefer-file-system-access

是否優(yōu)先從文件系統(tǒng)加載template,以支持熱加載,默認(rèn)為true

spring.freemarker.prefix

設(shè)定freemarker模板的前綴.

spring.freemarker.request-context-attribute

指定RequestContext屬性的名.

spring.freemarker.settings

設(shè)定FreeMarker keys.

spring.freemarker.suffix

設(shè)定模板的后綴.

spring.freemarker.template-loader-path

設(shè)定模板的加載路徑,多個(gè)以逗號(hào)分隔,默認(rèn): ["classpath:/templates/"]

spring.freemarker.view-names

指定使用模板的視圖列表.

spring.velocity.allow-request-override

指定HttpServletRequest的屬性是否可以覆蓋controller的model的同名項(xiàng)

spring.velocity.allow-session-override

指定HttpSession的屬性是否可以覆蓋controller的model的同名項(xiàng)

spring.velocity.cache

是否開(kāi)啟模板緩存

spring.velocity.charset

設(shè)定模板編碼

spring.velocity.check-template-location

是否檢查模板路徑是否存在.

spring.velocity.content-type

設(shè)定ContentType的值

spring.velocity.date-tool-attribute

設(shè)定暴露給velocity上下文使用的DateTool的名

spring.velocity.enabled

設(shè)定是否允許mvc使用velocity

spring.velocity.expose-request-attributes

是否在merge模板的時(shí)候,將request屬性都添加到model中

spring.velocity.expose-session-attributes

是否在merge模板的時(shí)候,將HttpSession屬性都添加到model中

spring.velocity.expose-spring-macro-helpers

設(shè)定是否以springMacroRequestContext的名來(lái)暴露RequestContext給Spring’s macro類庫(kù)使用

spring.velocity.number-tool-attribute

設(shè)定暴露給velocity上下文的NumberTool的名

spring.velocity.prefer-file-system-access

是否優(yōu)先從文件系統(tǒng)加載模板以支持熱加載,默認(rèn)為true

spring.velocity.prefix

設(shè)定velocity模板的前綴.

spring.velocity.properties

設(shè)置velocity的額外屬性.

spring.velocity.request-context-attribute

設(shè)定RequestContext attribute的名.

spring.velocity.resource-loader-path

設(shè)定模板路徑,默認(rèn)為: classpath:/templates/

spring.velocity.suffix

設(shè)定velocity模板的后綴.

spring.velocity.toolbox-config-location

設(shè)定Velocity Toolbox配置文件的路徑,比如 /WEB-INF/toolbox.xml.

spring.velocity.view-names

設(shè)定需要解析的視圖名稱.

spring.thymeleaf.cache

是否開(kāi)啟模板緩存,默認(rèn)true

spring.thymeleaf.check-template-location

是否檢查模板路徑是否存在,默認(rèn)true

spring.thymeleaf.content-type

指定Content-Type,默認(rèn)為: text/html

spring.thymeleaf.enabled

是否允許MVC使用Thymeleaf,默認(rèn)為: true

spring.thymeleaf.encoding

指定模板的編碼,默認(rèn)為: UTF-8

spring.thymeleaf.excluded-view-names

指定不使用模板的視圖名稱,多個(gè)以逗號(hào)分隔.

spring.thymeleaf.mode

指定模板的模式,具體查看StandardTemplateModeHandlers,默認(rèn)為: HTML5

spring.thymeleaf.prefix

指定模板的前綴,默認(rèn)為:classpath:/templates/

spring.thymeleaf.suffix

指定模板的后綴,默認(rèn)為:.html

spring.thymeleaf.template-resolver-order

指定模板的解析順序,默認(rèn)為第一個(gè).

spring.thymeleaf.view-names

指定使用模板的視圖名,多個(gè)以逗號(hào)分隔.

spring.mustache.cache

是否Enable template caching.

spring.mustache.charset

指定Template的編碼.

spring.mustache.check-template-location

是否檢查默認(rèn)的路徑是否存在.

spring.mustache.content-type

指定Content-Type.

spring.mustache.enabled

是否開(kāi)啟mustcache的模板支持.

spring.mustache.prefix

指定模板的前綴,默認(rèn): classpath:/templates/

spring.mustache.suffix

指定模板的后綴,默認(rèn): .html

spring.mustache.view-names

指定要使用模板的視圖名.

groovy模板

spring.groovy.template.allow-request-override

指定HttpServletRequest的屬性是否可以覆蓋controller的model的同名項(xiàng)

spring.groovy.template.allow-session-override

指定HttpSession的屬性是否可以覆蓋controller的model的同名項(xiàng)

spring.groovy.template.cache

是否開(kāi)啟模板緩存.

spring.groovy.template.charset

指定Template編碼.

spring.groovy.template.check-template-location

是否檢查模板的路徑是否存在.

spring.groovy.template.configuration.auto-escape

是否在渲染模板時(shí)自動(dòng)排查model的變量,默認(rèn)為: false

spring.groovy.template.configuration.auto-indent

是否在渲染模板時(shí)自動(dòng)縮進(jìn),默認(rèn)為false

spring.groovy.template.configuration.auto-indent-string

如果自動(dòng)縮進(jìn)啟用的話,是使用SPACES還是TAB,默認(rèn)為: SPACES

spring.groovy.template.configuration.auto-new-line

渲染模板時(shí)是否要輸出換行,默認(rèn)為false

spring.groovy.template.configuration.base-template-class

指定template base class.

spring.groovy.template.configuration.cache-templates

是否要緩存模板,默認(rèn)為true

spring.groovy.template.configuration.declaration-encoding

在寫(xiě)入declaration header時(shí)使用的編碼

spring.groovy.template.configuration.expand-empty-elements

是使用這種形式,還是這種展開(kāi)模式,默認(rèn)為: false

spring.groovy.template.configuration.locale

指定template locale.

spring.groovy.template.configuration.new-line-string

當(dāng)啟用自動(dòng)換行時(shí),換行的輸出,默認(rèn)為系統(tǒng)的line.separator屬性的值

spring.groovy.template.configuration.resource-loader-path

指定groovy的模板路徑,默認(rèn)為classpath:/templates/

spring.groovy.template.configuration.use-double-quotes

指定屬性要使用雙引號(hào)還是單引號(hào),默認(rèn)為false

spring.groovy.template.content-type

指定Content-Type.

spring.groovy.template.enabled

是否開(kāi)啟groovy模板的支持.

spring.groovy.template.expose-request-attributes

設(shè)定所有request的屬性在merge到模板的時(shí)候,是否要都添加到model中.

spring.groovy.template.expose-session-attributes

設(shè)定所有request的屬性在merge到模板的時(shí)候,是否要都添加到model中.

spring.groovy.template.expose-spring-macro-helpers

設(shè)定是否以springMacroRequestContext的形式暴露RequestContext給Spring’s macro library使用

spring.groovy.template.prefix

指定模板的前綴.

spring.groovy.template.request-context-attribute

指定RequestContext屬性的名.

spring.groovy.template.resource-loader-path

指定模板的路徑,默認(rèn)為: classpath:/templates/

spring.groovy.template.suffix

指定模板的后綴

spring.groovy.template.view-names

指定要使用模板的視圖名稱.

http

spring.hateoas.apply-to-primary-object-mapper

設(shè)定是否對(duì)object mapper也支持HATEOAS,默認(rèn)為: true

spring.http.converters.preferred-json-mapper

是否優(yōu)先使用JSON mapper來(lái)轉(zhuǎn)換.

spring.http.encoding.charset

指定http請(qǐng)求和相應(yīng)的Charset,默認(rèn): UTF-8

spring.http.encoding.enabled

是否開(kāi)啟http的編碼支持,默認(rèn)為true

spring.http.encoding.force

是否強(qiáng)制對(duì)http請(qǐng)求和響應(yīng)進(jìn)行編碼,默認(rèn)為true

json

spring.jackson.date-format

指定日期格式,比如yyyy-MM-dd HH:mm:ss,或者具體的格式化類的全限定名

spring.jackson.deserialization

是否開(kāi)啟Jackson的反序列化

spring.jackson.generator

是否開(kāi)啟json的generators.

spring.jackson.joda-date-time-format

指定Joda date/time的格式,比如yyyy-MM-dd HH:mm:ss). 如果沒(méi)有配置的話,dateformat會(huì)作為backup

spring.jackson.locale

指定json使用的Locale.

spring.jackson.mapper

是否開(kāi)啟Jackson通用的特性.

spring.jackson.parser

是否開(kāi)啟jackson的parser特性.

spring.jackson.property-naming-strategy

指定PropertyNamingStrategy (CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES)或者指定PropertyNamingStrategy子類的全限定名.

spring.jackson.serialization

是否開(kāi)啟jackson的序列化.

spring.jackson.serialization-inclusion

指定序列化時(shí)屬性的inclusion方式,具體查看JsonInclude.Include枚舉.

spring.jackson.time-zone

指定日期格式化時(shí)區(qū),比如America/Los_Angeles或者GMT+10.

jersey

spring.jersey.filter.order

指定Jersey filter的order,默認(rèn)為: 0

spring.jersey.init

指定傳遞給Jersey的初始化參數(shù).

spring.jersey.type

指定Jersey的集成類型,可以是servlet或者filter.


? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ????????Security


security.basic.authorize-mode

要使用權(quán)限控制模式.

security.basic.enabled

是否開(kāi)啟基本的鑒權(quán),默認(rèn)為true

security.basic.path

需要鑒權(quán)的path,多個(gè)的話以逗號(hào)分隔,默認(rèn)為[/**]

security.basic.realm

HTTP basic realm 的名字,默認(rèn)為Spring

security.enable-csrf

是否開(kāi)啟cross-site request forgery校驗(yàn),默認(rèn)為false.

security.filter-order

Security filter chain的order,默認(rèn)為0

security.headers.cache

是否開(kāi)啟http頭部的cache控制,默認(rèn)為false.

security.headers.content-type

是否開(kāi)啟X-Content-Type-Options頭部,默認(rèn)為false.

security.headers.frame

是否開(kāi)啟X-Frame-Options頭部,默認(rèn)為false.

security.headers.hsts

指定HTTP Strict Transport Security (HSTS)模式(none, domain, all).

security.headers.xss

是否開(kāi)啟cross-site scripting (XSS) 保護(hù),默認(rèn)為false.

security.ignored

指定不鑒權(quán)的路徑,多個(gè)的話以逗號(hào)分隔.

security.oauth2.client.access-token-uri

指定獲取access token的URI.

security.oauth2.client.access-token-validity-seconds

指定access token失效時(shí)長(zhǎng).

security.oauth2.client.additional-information.[key]

設(shè)定要添加的額外信息.

security.oauth2.client.authentication-scheme

指定傳輸不記名令牌(bearer token)的方式(form, header, none,query),默認(rèn)為header

security.oauth2.client.authorities

指定授予客戶端的權(quán)限.

security.oauth2.client.authorized-grant-types

指定客戶端允許的grant types.

security.oauth2.client.auto-approve-scopes

對(duì)客戶端自動(dòng)授權(quán)的scope.

security.oauth2.client.client-authentication-scheme

傳輸authentication credentials的方式(form, header, none, query),默認(rèn)為header方式

security.oauth2.client.client-id

指定OAuth2 client ID.

security.oauth2.client.client-secret

指定OAuth2 client secret. 默認(rèn)是一個(gè)隨機(jī)的secret.

security.oauth2.client.grant-type

指定獲取資源的access token的授權(quán)類型.

security.oauth2.client.id

指定應(yīng)用的client ID.

security.oauth2.client.pre-established-redirect-uri

服務(wù)端pre-established的跳轉(zhuǎn)URI.

security.oauth2.client.refresh-token-validity-seconds

指定refresh token的有效期.

security.oauth2.client.registered-redirect-uri

指定客戶端跳轉(zhuǎn)URI,多個(gè)以逗號(hào)分隔.

security.oauth2.client.resource-ids

指定客戶端相關(guān)的資源id,多個(gè)以逗號(hào)分隔.

security.oauth2.client.scope

client的scope

security.oauth2.client.token-name

指定token的名稱

security.oauth2.client.use-current-uri

是否優(yōu)先使用請(qǐng)求中URI,再使用pre-established的跳轉(zhuǎn)URI. 默認(rèn)為true

security.oauth2.client.user-authorization-uri

用戶跳轉(zhuǎn)去獲取access token的URI.

security.oauth2.resource.id

指定resource的唯一標(biāo)識(shí).

security.oauth2.resource.jwt.key-uri

JWT token的URI. 當(dāng)key為公鑰時(shí),或者value不指定時(shí)指定.

security.oauth2.resource.jwt.key-value

JWT token驗(yàn)證的value. 可以是對(duì)稱加密或者PEMencoded RSA公鑰. 可以使用URI作為value.

security.oauth2.resource.prefer-token-info

是否使用token info,默認(rèn)為true

security.oauth2.resource.service-id

指定service ID,默認(rèn)為resource.

security.oauth2.resource.token-info-uri

token解碼的URI.

security.oauth2.resource.token-type

指定當(dāng)使用userInfoUri時(shí),發(fā)送的token類型.

security.oauth2.resource.user-info-uri

指定user info的URI

security.oauth2.sso.filter-order

如果沒(méi)有顯示提供WebSecurityConfigurerAdapter時(shí)指定的Filter order.

security.oauth2.sso.login-path

跳轉(zhuǎn)到SSO的登錄路徑默認(rèn)為/login.

security.require-ssl

是否對(duì)所有請(qǐng)求開(kāi)啟SSL,默認(rèn)為false.

security.sessions

指定Session的創(chuàng)建策略(always, never, if_required, stateless).

security.user.name

指定默認(rèn)的用戶名,默認(rèn)為user.

security.user.password

默認(rèn)的用戶密碼.

security.user.role

默認(rèn)用戶的授權(quán)角色


? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? DataSource


spring.dao.exceptiontranslation.enabled

是否開(kāi)啟PersistenceExceptionTranslationPostProcessor,默認(rèn)為true

spring.datasource.abandon-when-percentage-full

設(shè)定超時(shí)被廢棄的連接占到多少比例時(shí)要被關(guān)閉或上報(bào)

spring.datasource.allow-pool-suspension

使用Hikari pool時(shí),是否允許連接池暫停,默認(rèn)為: false

spring.datasource.alternate-username-allowed

是否允許替代的用戶名.

spring.datasource.auto-commit

指定updates是否自動(dòng)提交.

spring.datasource.catalog

指定默認(rèn)的catalog.

spring.datasource.commit-on-return

設(shè)置當(dāng)連接被歸還時(shí),是否要提交所有還未完成的事務(wù)

spring.datasource.connection-init-sql

指定連接被創(chuàng)建,再被添加到連接池之前執(zhí)行的sql.

spring.datasource.connection-init-sqls

使用DBCP connection pool時(shí),指定初始化時(shí)要執(zhí)行的sql

spring.datasource.connection-properties.[key]

在使用DBCP connection pool時(shí)指定要配置的屬性

spring.datasource.connection-test-query

指定校驗(yàn)連接合法性執(zhí)行的sql語(yǔ)句

spring.datasource.connection-timeout

指定連接的超時(shí)時(shí)間,毫秒單位.

spring.datasource.continue-on-error

在初始化數(shù)據(jù)庫(kù)時(shí),遇到錯(cuò)誤是否繼續(xù),默認(rèn)false

spring.datasource.data

指定Data (DML)腳本

spring.datasource.data-source-class-name

指定數(shù)據(jù)源的全限定名.

spring.datasource.data-source-jndi

指定jndi的地址

spring.datasource.data-source-properties.[key]

使用Hikari connection pool時(shí),指定要設(shè)置的屬性

spring.datasource.db-properties

使用Tomcat connection pool,指定要設(shè)置的屬性

spring.datasource.default-auto-commit

是否自動(dòng)提交.

spring.datasource.default-catalog

指定連接默認(rèn)的catalog.

spring.datasource.default-read-only

是否設(shè)置默認(rèn)連接只讀.

spring.datasource.default-transaction-isolation

指定連接的事務(wù)的默認(rèn)隔離級(jí)別.

spring.datasource.driver-class-name

指定driver的類名,默認(rèn)從jdbc url中自動(dòng)探測(cè).

spring.datasource.fair-queue

是否采用FIFO返回連接.

spring.datasource.health-check-properties.[key]

使用Hikari connection pool時(shí),在心跳檢查時(shí)傳遞的屬性

spring.datasource.idle-timeout

指定連接多久沒(méi)被使用時(shí),被設(shè)置為空閑,默認(rèn)為10ms

spring.datasource.ignore-exception-on-pre-load

當(dāng)初始化連接池時(shí),是否忽略異常.

spring.datasource.init-sql

當(dāng)連接創(chuàng)建時(shí),執(zhí)行的sql

spring.datasource.initial-size

指定啟動(dòng)連接池時(shí),初始建立的連接數(shù)量

spring.datasource.initialization-fail-fast

當(dāng)創(chuàng)建連接池時(shí),沒(méi)法創(chuàng)建指定最小連接數(shù)量是否拋異常

spring.datasource.initialize

指定初始化數(shù)據(jù)源,是否用data.sql來(lái)初始化,默認(rèn): true

spring.datasource.isolate-internal-queries

指定內(nèi)部查詢是否要被隔離,默認(rèn)為false

spring.datasource.jdbc-interceptors

使用Tomcat connection pool時(shí),指定jdbc攔截器,分號(hào)分隔

spring.datasource.jdbc-url

指定JDBC URL.

spring.datasource.jmx-enabled

是否開(kāi)啟JMX,默認(rèn)為: false

spring.datasource.jndi-name

指定jndi的名稱.

spring.datasource.leak-detection-threshold

使用Hikari connection pool時(shí),多少毫秒檢測(cè)一次連接泄露.

spring.datasource.log-abandoned

使用DBCP connection pool,是否追蹤廢棄statement或連接,默認(rèn)為: false

spring.datasource.log-validation-errors

當(dāng)使用Tomcat connection pool是否打印校驗(yàn)錯(cuò)誤.

spring.datasource.login-timeout

指定連接數(shù)據(jù)庫(kù)的超時(shí)時(shí)間.

spring.datasource.max-active

指定連接池中最大的活躍連接數(shù).

spring.datasource.max-age

指定連接池中連接的最大年齡

spring.datasource.max-idle

指定連接池最大的空閑連接數(shù)量.

spring.datasource.max-lifetime

指定連接池中連接的最大生存時(shí)間,毫秒單位.

spring.datasource.max-open-prepared-statements

指定最大的打開(kāi)的prepared statements數(shù)量.

spring.datasource.max-wait

指定連接池等待連接返回的最大等待時(shí)間,毫秒單位.

spring.datasource.maximum-pool-size

指定連接池最大的連接數(shù),包括使用中的和空閑的連接.

spring.datasource.min-evictable-idle-time-millis

指定一個(gè)空閑連接最少空閑多久后可被清除.

spring.datasource.min-idle

指定必須保持連接的最小值(For DBCP and Tomcat connection pools)

spring.datasource.minimum-idle

指定連接維護(hù)的最小空閑連接數(shù),當(dāng)使用HikariCP時(shí)指定.

spring.datasource.name

指定數(shù)據(jù)源名.

spring.datasource.num-tests-per-eviction-run

指定運(yùn)行每個(gè)idle object evictor線程時(shí)的對(duì)象數(shù)量

spring.datasource.password

指定數(shù)據(jù)庫(kù)密碼.

spring.datasource.platform

指定schema要使用的Platform(schema-${platform}.sql),默認(rèn)為: all

spring.datasource.pool-name

指定連接池名字.

spring.datasource.pool-prepared-statements

指定是否池化statements.

spring.datasource.propagate-interrupt-state

在等待連接時(shí),如果線程被中斷,是否傳播中斷狀態(tài).

spring.datasource.read-only

當(dāng)使用Hikari connection pool時(shí),是否標(biāo)記數(shù)據(jù)源只讀

spring.datasource.register-mbeans

指定Hikari connection pool是否注冊(cè)JMX MBeans.

spring.datasource.remove-abandoned

指定當(dāng)連接超過(guò)廢棄超時(shí)時(shí)間時(shí),是否立刻刪除該連接.

spring.datasource.remove-abandoned-timeout

指定連接應(yīng)該被廢棄的時(shí)間.

spring.datasource.rollback-on-return

在歸還連接時(shí),是否回滾等待中的事務(wù).

spring.datasource.schema

指定Schema (DDL)腳本.

spring.datasource.separator

指定初始化腳本的語(yǔ)句分隔符,默認(rèn): ;

spring.datasource.sql-script-encoding

指定SQL scripts編碼.

spring.datasource.suspect-timeout

指定打印廢棄連接前的超時(shí)時(shí)間.

spring.datasource.test-on-borrow

當(dāng)從連接池借用連接時(shí),是否測(cè)試該連接.

spring.datasource.test-on-connect

創(chuàng)建時(shí),是否測(cè)試連接

spring.datasource.test-on-return

在連接歸還到連接池時(shí)是否測(cè)試該連接.

spring.datasource.test-while-idle

當(dāng)連接空閑時(shí),是否執(zhí)行連接測(cè)試.

spring.datasource.time-between-eviction-runs-millis

指定空閑連接檢查、廢棄連接清理、空閑連接池大小調(diào)整之間的操作時(shí)間間隔

spring.datasource.transaction-isolation

指定事務(wù)隔離級(jí)別,使用Hikari connection pool時(shí)指定

spring.datasource.url

指定JDBC URL.

spring.datasource.use-disposable-connection-facade

是否對(duì)連接進(jìn)行包裝,防止連接關(guān)閉之后被使用.

spring.datasource.use-equals

比較方法名時(shí)是否使用String.equals()替換==.

spring.datasource.use-lock

是否對(duì)連接操作加鎖

spring.datasource.username

指定數(shù)據(jù)庫(kù)名.

spring.datasource.validation-interval

指定多少ms執(zhí)行一次連接校驗(yàn).

spring.datasource.validation-query

指定獲取連接時(shí)連接校驗(yàn)的sql查詢語(yǔ)句.

spring.datasource.validation-query-timeout

指定連接校驗(yàn)查詢的超時(shí)時(shí)間.

spring.datasource.validation-timeout

設(shè)定連接校驗(yàn)的超時(shí)時(shí)間,當(dāng)使用Hikari connection pool時(shí)指定

spring.datasource.validator-class-name

用來(lái)測(cè)試查詢的validator全限定名.

spring.datasource.xa.data-source-class-name

指定數(shù)據(jù)源的全限定名.

spring.datasource.xa.properties

指定傳遞給XA data source的屬性

JPA

spring.jpa.database

指定目標(biāo)數(shù)據(jù)庫(kù).

spring.jpa.database-platform

指定目標(biāo)數(shù)據(jù)庫(kù)的類型.

spring.jpa.generate-ddl

是否在啟動(dòng)時(shí)初始化schema,默認(rèn)為false

spring.jpa.hibernate.ddl-auto

指定DDL mode (none, validate, update, create, create-drop). 當(dāng)使用內(nèi)嵌數(shù)據(jù)庫(kù)時(shí),默認(rèn)是create-drop,否則為none.

spring.jpa.hibernate.naming-strategy

指定命名策略.

spring.jpa.open-in-view

是否注冊(cè)O(shè)penEntityManagerInViewInterceptor,綁定JPA EntityManager到請(qǐng)求線程中,默認(rèn)為: true

spring.jpa.properties

添加額外的屬性到JPA provider.

spring.jpa.show-sql

是否開(kāi)啟sql的log,默認(rèn)為: false

jooq

spring.jooq.sql-dialect

指定JOOQ使用的SQLDialect,比如POSTGRES.

h2

spring.h2.console.enabled

是否開(kāi)啟控制臺(tái),默認(rèn)為false

spring.h2.console.path

指定控制臺(tái)路徑,默認(rèn)為: /h2-console

JTA

spring.jta.allow-multiple-lrc

是否允許 multiple LRC,默認(rèn)為: false

spring.jta.asynchronous2-pc

指定兩階段提交是否可以異步,默認(rèn)為: false

spring.jta.background-recovery-interval

指定多少分鐘跑一次recovery process,默認(rèn)為: 1

spring.jta.background-recovery-interval-seconds

指定多久跑一次recovery process,默認(rèn): 60

spring.jta.current-node-only-recovery

是否過(guò)濾掉其他非本JVM的recovery,默認(rèn)為: true

spring.jta.debug-zero-resource-transaction

是否追蹤沒(méi)有使用指定資源的事務(wù),默認(rèn)為: false

spring.jta.default-transaction-timeout

設(shè)定默認(rèn)的事務(wù)超時(shí)時(shí)間,默認(rèn)為60

spring.jta.disable-jmx

是否禁用jmx,默認(rèn)為false

spring.jta.enabled

是否開(kāi)啟JTA support,默認(rèn)為: true

spring.jta.exception-analyzer

設(shè)置指定的異常分析類

spring.jta.filter-log-status

使用Bitronix Transaction Manager時(shí),是否寫(xiě)mandatory logs,開(kāi)啟的話,可以節(jié)省磁盤(pán)空間,但是調(diào)試會(huì)復(fù)雜寫(xiě),默認(rèn)為false

spring.jta.force-batching-enabled

使用Bitronix Transaction Manager時(shí),是否批量寫(xiě)磁盤(pán),默認(rèn)為true.

spring.jta.forced-write-enabled

使用Bitronix Transaction Manager時(shí),是否強(qiáng)制寫(xiě)日志到磁盤(pán),默認(rèn)為true

spring.jta.graceful-shutdown-interval

當(dāng)使用Bitronix Transaction Manager,指定shutdown時(shí)等待事務(wù)結(jié)束的時(shí)間,超過(guò)則中斷,默認(rèn)為60

spring.jta.jndi-transaction-synchronization-registry-name

當(dāng)使用Bitronix Transaction Manager時(shí),在JNDI下得事務(wù)同步registry,默認(rèn)為: java:comp/TransactionSynchronizationRegistry

spring.jta.jndi-user-transaction-name

指定在JNDI使用Bitronix Transaction Manager的名稱,默認(rèn):java:comp/UserTransaction

spring.jta.journal

當(dāng)使用Bitronix Transaction Manager,指定The journal是否disk還是null還是一個(gè)類的全限定名,默認(rèn)disk

spring.jta.log-dir

Transaction logs directory.

spring.jta.log-part1-filename

指定The journal fragment文件1的名字,默認(rèn): btm1.tlog

spring.jta.log-part2-filename

指定The journal fragment文件2的名字,默認(rèn): btm2.tlog

spring.jta.max-log-size-in-mb

指定journal fragments大小的最大值. 默認(rèn): 2M

spring.jta.resource-configuration-filename

指定Bitronix Transaction Manager配置文件名.

spring.jta.server-id

指定Bitronix Transaction Manager實(shí)例的id.

spring.jta.skip-corrupted-logs

是否忽略corrupted log files文件,默認(rèn)為false.

spring.jta.transaction-manager-id

指定Transaction manager的唯一標(biāo)識(shí).

spring.jta.warn-about-zero-resource-transaction

當(dāng)使用Bitronix Transaction Manager時(shí),是否對(duì)沒(méi)有使用指定資源的事務(wù)進(jìn)行警告,默認(rèn)為: true


? ??????????????????????????????????????????????????Migration


flyway

flyway.baseline-description

對(duì)執(zhí)行遷移時(shí)基準(zhǔn)版本的描述.

flyway.baseline-on-migrate

當(dāng)遷移時(shí)發(fā)現(xiàn)目標(biāo)schema非空,而且?guī)в袥](méi)有元數(shù)據(jù)的表時(shí),是否自動(dòng)執(zhí)行基準(zhǔn)遷移,默認(rèn)false.

flyway.baseline-version

開(kāi)始執(zhí)行基準(zhǔn)遷移時(shí)對(duì)現(xiàn)有的schema的版本打標(biāo)簽,默認(rèn)值為1.

flyway.check-location

檢查遷移腳本的位置是否存在,默認(rèn)false.

flyway.clean-on-validation-error

當(dāng)發(fā)現(xiàn)校驗(yàn)錯(cuò)誤時(shí)是否自動(dòng)調(diào)用clean,默認(rèn)false.

flyway.enabled

是否開(kāi)啟flywary,默認(rèn)true.

flyway.encoding

設(shè)置遷移時(shí)的編碼,默認(rèn)UTF-8.

flyway.ignore-failed-future-migration

當(dāng)讀取元數(shù)據(jù)表時(shí)是否忽略錯(cuò)誤的遷移,默認(rèn)false.

flyway.init-sqls

當(dāng)初始化好連接時(shí)要執(zhí)行的SQL.

flyway.locations

遷移腳本的位置,默認(rèn)db/migration.

flyway.out-of-order

是否允許無(wú)序的遷移,默認(rèn)false.

flyway.password

目標(biāo)數(shù)據(jù)庫(kù)的密碼.

flyway.placeholder-prefix

設(shè)置每個(gè)placeholder的前綴,默認(rèn)${.

flyway.placeholder-replacement

placeholders是否要被替換,默認(rèn)true.

flyway.placeholder-suffix

設(shè)置每個(gè)placeholder的后綴,默認(rèn)}.

flyway.placeholders.[placeholder name]

設(shè)置placeholder的value

flyway.schemas

設(shè)定需要flywary遷移的schema,大小寫(xiě)敏感,默認(rèn)為連接默認(rèn)的schema.

flyway.sql-migration-prefix

遷移文件的前綴,默認(rèn)為V.

flyway.sql-migration-separator

遷移腳本的文件名分隔符,默認(rèn)__

flyway.sql-migration-suffix

遷移腳本的后綴,默認(rèn)為.sql

flyway.table

flyway使用的元數(shù)據(jù)表名,默認(rèn)為schema_version

flyway.target

遷移時(shí)使用的目標(biāo)版本,默認(rèn)為latest version

flyway.url

遷移時(shí)使用的JDBC URL,如果沒(méi)有指定的話,將使用配置的主數(shù)據(jù)源

flyway.user

遷移數(shù)據(jù)庫(kù)的用戶名

flyway.validate-on-migrate

遷移時(shí)是否校驗(yàn),默認(rèn)為true.

liquibase

liquibase.change-log

Change log 配置文件的路徑,默認(rèn)值為classpath:/db/changelog/db.changelog-master.yaml

liquibase.check-change-log-location

是否堅(jiān)持change log的位置是否存在,默認(rèn)為true.

liquibase.contexts

逗號(hào)分隔的運(yùn)行時(shí)context列表.

liquibase.default-schema

默認(rèn)的schema.

liquibase.drop-first

是否首先drop schema,默認(rèn)為false

liquibase.enabled

是否開(kāi)啟liquibase,默認(rèn)為true.

liquibase.password

目標(biāo)數(shù)據(jù)庫(kù)密碼

liquibase.url

要遷移的JDBC URL,如果沒(méi)有指定的話,將使用配置的主數(shù)據(jù)源.

liquibase.user

目標(biāo)數(shù)據(jù)用戶名


? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? NOSQL



cache

spring.cache.cache-names

指定要?jiǎng)?chuàng)建的緩存的名稱,逗號(hào)分隔(若該緩存實(shí)現(xiàn)支持的話)

spring.cache.ehcache.config

指定初始化EhCache時(shí)使用的配置文件的位置指定.

spring.cache.guava.spec

指定創(chuàng)建緩存要使用的spec,具體詳見(jiàn)CacheBuilderSpec.

spring.cache.hazelcast.config

指定初始化Hazelcast時(shí)的配置文件位置

spring.cache.infinispan.config

指定初始化Infinispan時(shí)的配置文件位置.

spring.cache.jcache.config

指定jcache的配置文件.

spring.cache.jcache.provider

指定CachingProvider實(shí)現(xiàn)類的全限定名.

spring.cache.type

指定緩存類型

mongodb

spring.mongodb.embedded.features

指定要開(kāi)啟的特性,逗號(hào)分隔.

spring.mongodb.embedded.version

指定要使用的版本,默認(rèn): 2.6.10

redis

spring.redis.database

指定連接工廠使用的Database index,默認(rèn)為: 0

spring.redis.host

指定Redis server host,默認(rèn)為: localhost

spring.redis.password

指定Redis server的密碼

spring.redis.pool.max-active

指定連接池最大的活躍連接數(shù),-1表示無(wú)限,默認(rèn)為8

spring.redis.pool.max-idle

指定連接池最大的空閑連接數(shù),-1表示無(wú)限,默認(rèn)為8

spring.redis.pool.max-wait

指定當(dāng)連接池耗盡時(shí),新獲取連接需要等待的最大時(shí)間,以毫秒單位,-1表示無(wú)限等待

spring.redis.pool.min-idle

指定連接池中空閑連接的最小數(shù)量,默認(rèn)為0

spring.redis.port

指定redis服務(wù)端端口,默認(rèn): 6379

spring.redis.sentinel.master

指定redis server的名稱

spring.redis.sentinel.nodes

指定sentinel節(jié)點(diǎn),逗號(hào)分隔,格式為host:port.

spring.redis.timeout

指定連接超時(shí)時(shí)間,毫秒單位,默認(rèn)為0

springdata

spring.data.elasticsearch.cluster-name

指定es集群名稱,默認(rèn): elasticsearch

spring.data.elasticsearch.cluster-nodes

指定es的集群,逗號(hào)分隔,不指定的話,則啟動(dòng)client node.

spring.data.elasticsearch.properties

指定要配置的es屬性.

spring.data.elasticsearch.repositories.enabled

是否開(kāi)啟es存儲(chǔ),默認(rèn)為: true

spring.data.jpa.repositories.enabled

是否開(kāi)啟JPA支持,默認(rèn)為: true

spring.data.mongodb.authentication-database

指定鑒權(quán)的數(shù)據(jù)庫(kù)名

spring.data.mongodb.database

指定mongodb數(shù)據(jù)庫(kù)名

spring.data.mongodb.field-naming-strategy

指定要使用的FieldNamingStrategy.

spring.data.mongodb.grid-fs-database

指定GridFS database的名稱.

spring.data.mongodb.host

指定Mongo server host.

spring.data.mongodb.password

指定Mongo server的密碼.

spring.data.mongodb.port

指定Mongo server port.

spring.data.mongodb.repositories.enabled

是否開(kāi)啟mongodb存儲(chǔ),默認(rèn)為true

spring.data.mongodb.uri

指定Mongo database URI.默認(rèn):mongodb://localhost/test

spring.data.mongodb.username

指定登陸mongodb的用戶名.

spring.data.rest.base-path

指定暴露資源的基準(zhǔn)路徑.

spring.data.rest.default-page-size

指定每頁(yè)的大小,默認(rèn)為: 20

spring.data.rest.limit-param-name

指定limit的參數(shù)名,默認(rèn)為: size

spring.data.rest.max-page-size

指定最大的頁(yè)數(shù),默認(rèn)為1000

spring.data.rest.page-param-name

指定分頁(yè)的參數(shù)名,默認(rèn)為: page

spring.data.rest.return-body-on-create

當(dāng)創(chuàng)建完實(shí)體之后,是否返回body,默認(rèn)為false

spring.data.rest.return-body-on-update

在更新完實(shí)體后,是否返回body,默認(rèn)為false

spring.data.rest.sort-param-name

指定排序使用的key,默認(rèn)為: sort

spring.data.solr.host

指定Solr host,如果有指定了zk的host的話,則忽略。默認(rèn)為: http://127.0.0.1:8983/solr

spring.data.solr.repositories.enabled

是否開(kāi)啟Solr repositories,默認(rèn)為: true

spring.data.solr.zk-host

指定zk的地址,格式為HOST:PORT.


? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? MQ


activemq

spring.activemq.broker-url

指定ActiveMQ broker的URL,默認(rèn)自動(dòng)生成.

spring.activemq.in-memory

是否是內(nèi)存模式,默認(rèn)為true.

spring.activemq.password

指定broker的密碼.

spring.activemq.pooled

是否創(chuàng)建PooledConnectionFactory,而非ConnectionFactory,默認(rèn)false

spring.activemq.user

指定broker的用戶.

artemis(HornetQ捐獻(xiàn)給apache后的版本)

spring.artemis.embedded.cluster-password

指定集群的密碼,默認(rèn)是啟動(dòng)時(shí)隨機(jī)生成.

spring.artemis.embedded.data-directory

指定Journal文件的目錄.如果不開(kāi)始持久化則不必要指定.

spring.artemis.embedded.enabled

是否開(kāi)啟內(nèi)嵌模式,默認(rèn)true

spring.artemis.embedded.persistent

是否開(kāi)啟persistent store,默認(rèn)false.

spring.artemis.embedded.queues

指定啟動(dòng)時(shí)創(chuàng)建的隊(duì)列,多個(gè)用逗號(hào)分隔,默認(rèn): []

spring.artemis.embedded.server-id

指定Server ID. 默認(rèn)是一個(gè)自增的數(shù)字,從0開(kāi)始.

spring.artemis.embedded.topics

指定啟動(dòng)時(shí)創(chuàng)建的topic,多個(gè)的話逗號(hào)分隔,默認(rèn): []

spring.artemis.host

指定Artemis broker 的host. 默認(rèn): localhost

spring.artemis.mode

指定Artemis 的部署模式, 默認(rèn)為auto-detected(也可以為native or embedded).

spring.artemis.port

指定Artemis broker 的端口,默認(rèn)為: 61616

rabbitmq

spring.rabbitmq.addresses

指定client連接到的server的地址,多個(gè)以逗號(hào)分隔.

spring.rabbitmq.dynamic

是否創(chuàng)建AmqpAdmin bean. 默認(rèn)為: true)

spring.rabbitmq.host

指定RabbitMQ host.默認(rèn)為: localhost)

spring.rabbitmq.listener.acknowledge-mode

指定Acknowledge的模式.

spring.rabbitmq.listener.auto-startup

是否在啟動(dòng)時(shí)就啟動(dòng)mq,默認(rèn): true)

spring.rabbitmq.listener.concurrency

指定最小的消費(fèi)者數(shù)量.

spring.rabbitmq.listener.max-concurrency

指定最大的消費(fèi)者數(shù)量.

spring.rabbitmq.listener.prefetch

指定一個(gè)請(qǐng)求能處理多少個(gè)消息,如果有事務(wù)的話,必須大于等于transaction數(shù)量.

spring.rabbitmq.listener.transaction-size

指定一個(gè)事務(wù)處理的消息數(shù)量,最好是小于等于prefetch的數(shù)量.

spring.rabbitmq.password

指定broker的密碼.

spring.rabbitmq.port

指定RabbitMQ 的端口,默認(rèn): 5672)

spring.rabbitmq.requested-heartbeat

指定心跳超時(shí),0為不指定.

spring.rabbitmq.ssl.enabled

是否開(kāi)始SSL,默認(rèn): false)

spring.rabbitmq.ssl.key-store

指定持有SSL certificate的key store的路徑

spring.rabbitmq.ssl.key-store-password

指定訪問(wèn)key store的密碼.

spring.rabbitmq.ssl.trust-store

指定持有SSL certificates的Trust store.

spring.rabbitmq.ssl.trust-store-password

指定訪問(wèn)trust store的密碼.

spring.rabbitmq.username

指定登陸broker的用戶名.

spring.rabbitmq.virtual-host

指定連接到broker的Virtual host.

hornetq

spring.hornetq.embedded.cluster-password

指定集群的密碼,默認(rèn)啟動(dòng)時(shí)隨機(jī)生成.

spring.hornetq.embedded.data-directory

指定Journal file 的目錄. 如果不開(kāi)啟持久化則不必指定.

spring.hornetq.embedded.enabled

是否開(kāi)啟內(nèi)嵌模式,默認(rèn):true

spring.hornetq.embedded.persistent

是否開(kāi)啟persistent store,默認(rèn): false

spring.hornetq.embedded.queues

指定啟動(dòng)是創(chuàng)建的queue,多個(gè)以逗號(hào)分隔,默認(rèn): []

spring.hornetq.embedded.server-id

指定Server ID. 默認(rèn)使用自增數(shù)字,從0開(kāi)始.

spring.hornetq.embedded.topics

指定啟動(dòng)時(shí)創(chuàng)建的topic,多個(gè)以逗號(hào)分隔,默認(rèn): []

spring.hornetq.host

指定HornetQ broker 的host,默認(rèn): localhost

spring.hornetq.mode

指定HornetQ 的部署模式,默認(rèn)是auto-detected,也可以指定native 或者 embedded.

spring.hornetq.port

指定HornetQ broker 端口,默認(rèn): 5445

jms

spring.jms.jndi-name

指定Connection factory JNDI 名稱.

spring.jms.listener.acknowledge-mode

指定ack模式,默認(rèn)自動(dòng)ack.

spring.jms.listener.auto-startup

是否啟動(dòng)時(shí)自動(dòng)啟動(dòng)jms,默認(rèn)為: true

spring.jms.listener.concurrency

指定最小的并發(fā)消費(fèi)者數(shù)量.

spring.jms.listener.max-concurrency

指定最大的并發(fā)消費(fèi)者數(shù)量.

spring.jms.pub-sub-domain

是否使用默認(rèn)的destination type來(lái)支持 publish/subscribe,默認(rèn): false


? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Other


aop

spring.aop.auto

是否支持@EnableAspectJAutoProxy,默認(rèn)為: true

spring.aop.proxy-target-class

true為使用CGLIB代理,false為JDK代理,默認(rèn)為false

application

spring.application.admin.enabled

是否啟用admin特性,默認(rèn)為: false

spring.application.admin.jmx-name

指定admin MBean的名稱,默認(rèn)為: org.springframework.boot:type=Admin,name=SpringApplication

autoconfig

spring.autoconfigure.exclude

配置要排除的Auto-configuration classes.

batch

spring.batch.initializer.enabled

是否在必要時(shí)創(chuàng)建batch表,默認(rèn)為true

spring.batch.job.enabled

是否在啟動(dòng)時(shí)開(kāi)啟batch job,默認(rèn)為true

spring.batch.job.names

指定啟動(dòng)時(shí)要執(zhí)行的job的名稱,逗號(hào)分隔,默認(rèn)所有job都會(huì)被執(zhí)行

spring.batch.schema

指定要初始化的sql語(yǔ)句路徑,默認(rèn):classpath:org/springframework/batch/core/schema-@@platform@@.sql)

spring.batch.table-prefix

指定批量處理的表的前綴.

jmx

spring.jmx.default-domain

指定JMX domain name.

spring.jmx.enabled

是否暴露jmx,默認(rèn)為true

spring.jmx.server

指定MBeanServer bean name. 默認(rèn)為: mbeanServer)

mail

spring.mail.default-encoding

指定默認(rèn)MimeMessage的編碼,默認(rèn)為: UTF-8

spring.mail.host

指定SMTP server host.

spring.mail.jndi-name

指定mail的jndi名稱

spring.mail.password

指定SMTP server登陸密碼.

spring.mail.port

指定SMTP server port.

spring.mail.properties

指定JavaMail session屬性.

spring.mail.protocol

指定SMTP server使用的協(xié)議,默認(rèn)為: smtp

spring.mail.test-connection

指定是否在啟動(dòng)時(shí)測(cè)試郵件服務(wù)器連接,默認(rèn)為false

spring.mail.username

指定SMTP server的用戶名.

sendgrid

spring.sendgrid.password

指定SendGrid password.

spring.sendgrid.proxy.host

指定SendGrid proxy host.

spring.sendgrid.proxy.port

指定SendGrid proxy port.

spring.sendgrid.username

指定SendGrid username.

social

spring.social.auto-connection-views

是否開(kāi)啟連接狀態(tài)的視圖,默認(rèn)為false

spring.social.facebook.app-id

指定應(yīng)用id

spring.social.facebook.app-secret

指定應(yīng)用密碼

spring.social.linkedin.app-id

指定應(yīng)用id

spring.social.linkedin.app-secret

指定應(yīng)用密碼

spring.social.twitter.app-id

指定應(yīng)用ID.

spring.social.twitter.app-secret

指定應(yīng)用密碼

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 228,412評(píng)論 6 532
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡,警方通過(guò)查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 98,514評(píng)論 3 416
  • 文/潘曉璐 我一進(jìn)店門(mén),熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人,你說(shuō)我怎么就攤上這事。” “怎么了?”我有些...
    開(kāi)封第一講書(shū)人閱讀 176,373評(píng)論 0 374
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我,道長(zhǎng),這世上最難降的妖魔是什么? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 62,975評(píng)論 1 312
  • 正文 為了忘掉前任,我火速辦了婚禮,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 71,743評(píng)論 6 410
  • 文/花漫 我一把揭開(kāi)白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上,一...
    開(kāi)封第一講書(shū)人閱讀 55,199評(píng)論 1 324
  • 那天,我揣著相機(jī)與錄音,去河邊找鬼。 笑死,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,262評(píng)論 3 441
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起,我...
    開(kāi)封第一講書(shū)人閱讀 42,414評(píng)論 0 288
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 48,951評(píng)論 1 336
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 40,780評(píng)論 3 354
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 42,983評(píng)論 1 369
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 38,527評(píng)論 5 359
  • 正文 年R本政府宣布,位于F島的核電站,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 44,218評(píng)論 3 347
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 34,649評(píng)論 0 26
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 35,889評(píng)論 1 286
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 51,673評(píng)論 3 391
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 47,967評(píng)論 2 374

推薦閱讀更多精彩內(nèi)容