Spring Boot application.properties配置屬性

application的配置屬性。

這些屬性是否生效取決于對(duì)應(yīng)的組件是否聲明為Spring應(yīng)用程序上下文里的Bean(基本是自動(dòng)配置的),為一個(gè)不生效的組件設(shè)置屬性是沒有用的。

multipart

multipart.enabled 開啟上傳支持(默認(rèn):true)

multipart.file-size-threshold:大于該值的文件會(huì)被寫到磁盤上

multipart.location 上傳文件存放位置

multipart.max-file-size最大文件大小

multipart.max-request-size 最大請(qǐng)求大小

server

server.address 服務(wù)器地址

server.port服務(wù)器端口

server.context-parameters.[param name]設(shè)置servlet上下文參數(shù)

server.context-path應(yīng)用上下文路徑

Jsp-servelt

server.jsp-servelt.class-name針對(duì)jsp使用的Servlet類名(默認(rèn):org.apache.jasper.servlet.JspServlet)

server.jsp-servlet.registered JspServelt是否要注冊(cè)到內(nèi)嵌的Servlet容器里(默認(rèn)true)

server.jsp-servlet.init-parameters[param name] 設(shè)置Jsp Servlet初始化參數(shù)

server.servlet-path主分發(fā)器Servlet的路徑(默認(rèn):/)

Session

server.session.cookie.domain 回話Cookie的域

server.session.cookie.comment Cookie注釋

server.session.cookie.max-age Cookie最大保存時(shí)間(單位s)

server.session.cookie.name Cookie名稱

server.session.cookie.timeout 超時(shí)時(shí)間

tomcat

server.tomcat.accesslog.directory 創(chuàng)建日志文件的目錄

server.tomcat.accesslog.enabled 是否開啟訪問日志(默認(rèn):false)

server.tomcat.accesslog.pattern 訪問日志的格式(默認(rèn):common)

server.tomcat.accesslog.prefix日志名前綴(默認(rèn):access_log)

server.tomcat.accesslog.suffix 日志名后綴(默認(rèn):.log)

server.tomcat.max-http-header-sizeHttp消息頭最大字節(jié)數(shù)(默認(rèn):0)

server.tomcat.uri-encoding 用來解碼URI的字符編碼

Cache

spring.cache.cache-names 如果底層緩存管理器支持緩存名的話,可以在這里指定要?jiǎng)?chuàng)建的緩存名列表,用逗號(hào)分 隔。通常這會(huì)禁用運(yùn)行時(shí)創(chuàng)建其他額外緩存的能力。

spring.cache.config 用來初始化EhCache的配置文件位置

spring.cache.guava.spec 用來創(chuàng)建緩存Spec

spring.cache.hazelcast.config 用來初始化Hazeleast的配置文件位置

spring.cache.infinispan.config 用來初始化Infinispan配置文件位置

spring.cache.jcache.config用來初始化緩存管理器的配置文件的位置,配置文件依賴于底層的緩存實(shí)現(xiàn)

spring.cache.jcache.provider CachingProvider 實(shí)現(xiàn)的全限定類名,用來獲取JSR-107兼容的緩存管理器,僅在 Classpath里有不只一個(gè)JSR-107實(shí)現(xiàn)時(shí)才需要這個(gè)屬性。

spring.cache.type 緩存類型,默認(rèn)根據(jù)環(huán)境自動(dòng)檢測(cè)

Data

spring.data.jpa.repositories.enabled 開啟JPA倉(cāng)庫(kù)(默認(rèn):true)

spring.data.mongodb.authentication-database 身份認(rèn)證數(shù)據(jù)庫(kù)名

spring.data.mongodb.database 數(shù)據(jù)庫(kù)名

spring.data.mongodb.field-naming-strategy 要使用的 FieldNamingStrategy 的全限定名。

spring.data.mongodb.grid.fs.database GridFS數(shù)據(jù)庫(kù)名稱

spring.data.mongodb.host MongoDB服務(wù)器地址

spring.data.mongodb.username MongoDB賬號(hào)

spring.data.mongodb.passwordMongoDB密碼

spring.data.mongodb.port 端口號(hào)

spring.data.mongodb.repositories.enabled 開啟Mongo倉(cāng)庫(kù)(默認(rèn)值:true)

spring.data.mongodb.uri Mongo數(shù)據(jù)庫(kù)URI。設(shè)置了該屬性后就主機(jī)和端口號(hào)會(huì)被忽略。(默認(rèn)值: mongodb:// localhost/test)

spring.data.rest.base-path 用于發(fā)布倉(cāng)庫(kù)資源的基本路徑

spring.data.rest.default-page-size 分頁數(shù)據(jù)的默認(rèn)頁大?。J(rèn):20)

spring.data.rest.limit-param-name用于標(biāo)識(shí)一次返回多少記錄的URL查詢字符串參數(shù)名。(默認(rèn)值: size )

spring.data.rest.max-page-sieze:最大分頁大?。J(rèn):1000)

spring.data.rest.page-param-name URL查詢字符串參數(shù)的名稱,用來標(biāo)識(shí)返回哪一頁。(默認(rèn)值: page )

spring.data.rest.return-body-on-create 在創(chuàng)建實(shí)體后是否返回一個(gè)響應(yīng)體(默認(rèn):false)

spring.data.rest.return-body-on-update 在更新實(shí)體后是否返回一個(gè)響應(yīng)體(默認(rèn):false)

spring.data.rest.sort-param-name URL查詢字符串參數(shù)的名稱,用來表示結(jié)果排序的方向(默認(rèn):name)

spring.data.solr.host Solr的主機(jī)地址。如果設(shè)置了 zk-host 則忽略該屬性。(默認(rèn)值: http://127.0.0.1: 8983/solr )

spring.data.solr.repositories.enabled 開啟solr倉(cāng)庫(kù)(默認(rèn):true)

spring.data.solr.zk-host zk主機(jī)地址,格式為"主機(jī)-端口"

spring.datasource.allow-pool-suspension 是否允許池暫停(pool suspension)。在開啟池暫停后會(huì)有性能會(huì)受到一定影響,除非你 真的需要這個(gè)功能(例如在冗余的系統(tǒng)下),否則不要開啟它。該屬性只在使用Hikari數(shù) 據(jù)庫(kù)連接池時(shí)有用。(默認(rèn)值: false 。)

DataSource

spring.datasource.name 數(shù)據(jù)源的名稱。

spring.datasource.username 數(shù)據(jù)庫(kù)的登錄用戶名。

spring.datasource.password 數(shù)據(jù)庫(kù)的登錄密碼。

spring.datasource.url 數(shù)據(jù)庫(kù)的JDBC URL。

spring.datasource.jdbc-url 用來創(chuàng)建連接的JDBC URL。

spring.datasource.driver-class-name JDBC驅(qū)動(dòng)的全限定類名。默認(rèn)根據(jù)URL自動(dòng)檢測(cè)。

spring.datasource.pool-name 連接池名稱。

spring.datasource.max-active 連接池中的最大活躍連接數(shù)。

spring.datasource.connection-timeout連接超時(shí)(單位毫秒)

spring.datasource.max-age 連接池中連接的最長(zhǎng)壽命。

spring.datasource.max-idle 連接池中的最大空閑連接數(shù)。

spring.datasource.max-lifetime 連接池中連接的最長(zhǎng)壽命(單位為毫秒)。

spring.datasource.max-open-prepared-statements 開啟狀態(tài)的 PreparedStatement 的數(shù)量上限。

spring.datasource.max-wait 連接池在等待返回連接時(shí),最長(zhǎng)等待多少毫秒再拋出異常。

spring.datasource.maximum-pool-size 連接池能達(dá)到的最大規(guī)模,包含空閑連接的數(shù)量和使用中的連接數(shù)量。

spring.datasource.min-evictable-idle-time-millis 一個(gè)空閑連接被空閑連接釋放器(如果存在的話)優(yōu)雅地釋放前,最短會(huì)在連接池里停 留多少時(shí)間。

spring.datasource.min-idle 連接池里始終應(yīng)該保持的最小連接數(shù)。(用于DBCP和Tomcat連接池。)

spring.datasource.minimum-idle: HikariCP試圖在連接池里維持的最小空閑連接數(shù)。

spring.datasource.alternate-username-allowed 是否允許其它用戶名

spring.datasource.auto-commit 更新操作是否自動(dòng)提交

spring.datasource.abandon-when-percentage-full 一個(gè)百分比形勢(shì)的閾值,超過該閾值則關(guān)閉并報(bào)告被棄用的連接

spring.datasource.catalog 默認(rèn)的Catalog名稱

spring.datasource.commit-on-return 在連接歸還時(shí),連接池是否要提交掛起的事務(wù)

spring.datasource.connection-init-sql 在所有新連接創(chuàng)建時(shí)都會(huì)執(zhí)行的SQL語句,該語句會(huì)在連接加入連接池前執(zhí)行。

spring.datasource.connection-init-sqls 在物理連接第一次創(chuàng)建時(shí)執(zhí)行的SQL語句列表。(用于DBCP連接池。)

spring.datasource.connection-properties.[key] 設(shè)置創(chuàng)建連接時(shí)使用的屬性。(用于DBCP連接池。)

spring.datasource.continue-on-error 初始化數(shù)據(jù)庫(kù)時(shí)發(fā)生錯(cuò)誤不要終止。(默認(rèn)值: false)

spring.datasource.data 指向數(shù)據(jù)(數(shù)據(jù)庫(kù)操縱語言,Data Manipulation Language,DML)腳本資源的引用。

spring.datasource.data-source-class-name 用于獲取連接的數(shù)據(jù)源的全限定類名。

spring.datasource.data-source-jndi 用于獲取連接的數(shù)據(jù)源的JNDI位置。

spring.datasource.data-source-properties.[key] 設(shè)置創(chuàng)建數(shù)據(jù)源時(shí)使用的屬性。(用于Hikari連接池。)

spring.datasource.db-properties 設(shè)置創(chuàng)建數(shù)據(jù)源時(shí)使用的屬性。(用于Tomcat連接池。)

spring.datasource.default-auto-commit 連接上的操作是否自動(dòng)提交。

spring.datasource.default-catalog 連接的默認(rèn)Catalog。

spring.datasource.default-read-only 連接的默認(rèn)只讀狀態(tài)。

spring.datasource.default-transaction-isolation 連接的默認(rèn)事務(wù)隔離級(jí)別。

spring.datasource.fair-queue 是否以FIFO方式返回連接。

spring.datasource.health-check-properties.[key] 設(shè)置要納入健康檢查的屬性。(用于Hikari連接池。)

spring.datasource.idle-timeout 連接池中的連接能保持閑置狀態(tài)的最長(zhǎng)時(shí)間,單位為毫秒。(默認(rèn)值: 10 。)

spring.datasource.ignore-exception-on-pre-load 初始化數(shù)據(jù)庫(kù)連接池時(shí)是否要忽略連接。

spring.datasource.init-sql在連接第一次創(chuàng)建時(shí)運(yùn)行的自定義查詢。

spring.datasource.initial-size 在連接池啟動(dòng)時(shí)要建立的連接數(shù)。

spring.datasource.initialization-fail-fast 在連接池創(chuàng)建時(shí),如果達(dá)不到最小連接數(shù)是否要拋出異常。(默認(rèn)值: true 。)

spring.datasource.initialize 使用data.sql初始化數(shù)據(jù)庫(kù)。(默認(rèn)值: true 。)

spring.datasource.isolate-internal-queries 是否要隔離內(nèi)部請(qǐng)求。(默認(rèn)值: false 。)

spring.datasource.jdbc-interceptors 一個(gè)分號(hào)分隔的類名列表,這些類都擴(kuò)展了 JdbcInterceptor 類。這些攔截器會(huì)插入 java.sql.Connection 對(duì)象的操作鏈里。(用于Tomcat連接池。)

spring.datasource.jmx-enabled 開啟JMX支持(如果底層連接池提供該功能的話)。(默認(rèn)值: false 。)

spring.datasource.jndi-name 數(shù)據(jù)源的JNDI位置。設(shè)置了該屬性則忽略類、URL、用戶名和密碼屬性。

spring.datasource.leak-detection-threshold 用來檢測(cè)Hikari連接池連接泄露的閾值,單位為毫秒。

spring.datasource.log-abandoned 是否針對(duì)棄用語句或連接的應(yīng)用程序代碼記錄下跟蹤棧。用于DBCP連接池。(默認(rèn)值: false 。)

spring.datasource.log-validation-errors 在使用Tomcat連接池時(shí)是否要記錄驗(yàn)證錯(cuò)誤。

spring.datasource.login-timeout 連接數(shù)據(jù)庫(kù)的超時(shí)時(shí)間(單位為秒)。

spring.datasource.num-tests-per-eviction-run 空閑對(duì)象釋放器線程(如果存在的話)每次運(yùn)行時(shí)要檢查的對(duì)象數(shù)。

spring.datasource.platform 在Schema資源(schema-${platform}.sql)里要使用的平臺(tái)。(默認(rèn)值: all 。)

spring.datasource.pool-prepared-statements 是否要將 Statement 放在池里。

spring.datasource.propagate-interrupt-state 對(duì)于等待連接的中斷線程,是否要傳播中斷狀態(tài)。

spring.datasource.read-only 在使用Hikari連接池時(shí)將數(shù)據(jù)源設(shè)置為只讀。

spring.datasource.register-mbeans Hikari連接池是否要注冊(cè)JMX MBean。

spring.datasource.remove-abandoned 被棄用的連接在到達(dá)棄用超時(shí)后是否應(yīng)該被移除。

spring.datasource.remove-abandoned-timeout 連接在多少秒后應(yīng)該考慮棄用。

spring.datasource.rollback-on-return 在連接歸還連接池時(shí),是否要回滾掛起的事務(wù)。

spring.datasource.schema Schema(數(shù)據(jù)定義語言,Data Definition Language,DDL)腳本資源的引用。

spring.datasource.separator SQL初始化腳本里的語句分割符。(默認(rèn)值: ; 。)

spring.datasource.sql-script-encoding SQL腳本的編碼。

spring.datasource.suspect-timeout 在記錄一個(gè)疑似棄用連接前要等待多少秒。

spring.datasource.test-on-borrow 從連接池中借用連接時(shí)是否要進(jìn)行測(cè)試。

spring.datasource.test-on-connect 在建立連接時(shí)是否要進(jìn)行測(cè)試。

spring.datasource.test-on-return 在將連接歸還到連接池時(shí)是否要進(jìn)行測(cè)試。

spring.datasource.test-while-idle 在連接空閑時(shí)是否要進(jìn)行測(cè)試。

spring.datasource.time-between-eviction-runs-millis 在兩次空閑連接驗(yàn)證、棄用連接清理和空閑池大小調(diào)整之間睡眠的毫秒數(shù)。

spring.datasource.transaction-isolation 在使用Hikari連接池時(shí)設(shè)置默認(rèn)事務(wù)隔離級(jí)別。

spring.datasource.use-disposable-connection-facade 連接是否要用一個(gè)門面(facade)封裝起來,在調(diào)用了 Connection.close() 后就不能 再使用這個(gè)連接了。

spring.datasource.use-equals 在比較方法名時(shí)是否使用 String.equals() 來代替 == 。

spring.datasource.use-lock 在操作連接對(duì)象時(shí)是否要加鎖。

spring.datasource.validation-interval 執(zhí)行連接驗(yàn)證的間隔時(shí)間,單位為毫秒。

spring.datasource.validation-query 在連接池里的連接返回給調(diào)用者或連接池時(shí),要執(zhí)行的驗(yàn)證SQL查詢。

spring.datasource.validation-query-timeout 在連接驗(yàn)證查詢執(zhí)行失敗前等待的超時(shí)時(shí)間,單位為秒。

spring.datasource.validation-timeout 在連接驗(yàn)證失敗前等待的超時(shí)時(shí)間,單位為秒。(用于Hikari連接池。)

spring.datasource.validator-class-name 可選驗(yàn)證器類的全限定類名,用于執(zhí)行測(cè)試查詢。

spring.datasource.xa.data-source-class-name XA數(shù)據(jù)源的全限定類名。

spring.datasource.xa.properties 要傳遞給XA數(shù)據(jù)源的屬性。

FreeMarker

spring.freemarker.allow-request-override HttpServletRequest 的屬性是否允許覆蓋(隱藏)控制器生成的同名模型屬性。

spring.freemarker.allow-session-override HttpSession 的屬性是否允許覆蓋(隱藏)控制器生成的同名模型屬性。

spring.freemarker.cache 開啟模板緩存。

spring.freemarker.charset 模板編碼。

spring.freemarker.check-template-location 檢查模板位置是否存在。

spring.freemarker.content-type Content-Type 的值。

spring.freemarker.enabled 開啟FreeMarker的MVC視圖解析。

spring.freemarker.expose-request-attributes 在模型合并到模板前,是否要把所有的請(qǐng)求屬性添加到模型里。

spring.freemarker.expose-session-attributes 在模型合并到模板前,是否要把所有的 HttpSession 屬性添加到模型里。

spring.freemarker.expose-spring-macro-helpers 是否發(fā)布供Spring宏程序庫(kù)使用的 RequestContext ,并將命其名為 springMacro- RequestContext

spring.freemarker.prefer-file-system-access 加載模板時(shí)優(yōu)先通過文件系統(tǒng)訪問。文件系統(tǒng)訪問能夠?qū)崟r(shí)檢測(cè)到模板變更。(默認(rèn)值: true 。)

spring.freemarker.prefix 在構(gòu)建URL時(shí)添加到視圖名稱前的前綴。

spring.freemarker.request-context-attribute 在所有視圖里使用的 RequestContext 屬性的名稱。

spring.freemarker.settings 要傳遞給FreeMarker配置的各種鍵。

spring.freemarker.suffix 在構(gòu)建URL時(shí)添加到視圖名稱后的后綴。

spring.freemarker.template-loader-path 模板路徑列表,用逗號(hào)分隔。(默認(rèn)值: ["classpath:/templates/"] 。)

spring.freemarker.view-names 可解析的視圖名稱的白名單。

Groovy

spring.groovy.template.allow-request-override HttpServletRequest 的屬性是否允許覆蓋(隱藏)控制器生成的同名模型屬性。

spring.groovy.template.allow-session-override HttpSession 的屬性是否允許覆蓋(隱藏)控制器生成的同名模型屬性。

spring.groovy.template.cache 開啟模板緩存。

spring.groovy.template.charset 模板編碼。

spring.groovy.template.check-template-location 檢查模板位置是否存在。

spring.groovy.template.configuration.auto-escape 模型變量在模板里呈現(xiàn)時(shí)是否要做轉(zhuǎn)義。(默認(rèn)值: false 。)

spring.groovy.template.configuration.auto-indent 模板是否要自動(dòng)呈現(xiàn)縮進(jìn)。(默認(rèn)值: false 。)

spring.groovy.template.configuration.auto-indent-string 開啟自動(dòng)縮進(jìn)時(shí)用于縮進(jìn)的字符串,可以是 SPACES ,也可以是 TAB 。(默認(rèn)值: SPACES 。)

spring.groovy.template.configuration.auto-new-line 模板里是否要呈現(xiàn)新的空行。(默認(rèn)值: false 。)

spring.groovy.template.configuration.base-template-class 模板基類。

spring.groovy.template.configuration.cache-templates 模板是否應(yīng)該緩存。(默認(rèn)值: true 。)

spring.groovy.template.configuration.declaration-encoding 用來寫聲明頭的編碼。

spring.groovy.template.configuration.expand-empty-elements 沒有正文的元素該用短形式(例如, )還是擴(kuò)展形式(例如, )來書 寫。(默認(rèn)值: false)

spring.groovy.template.configuration.locale 設(shè)置模板地域。

spring.groovy.template.configuration.new-line-string 在自動(dòng)空行開啟后用來呈現(xiàn)空行的字符串。(默認(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 開啟Groovy模板的MVC視圖解析。

spring.groovy.template.expose-request-attributes 在模型合并到模板前,是否要把所有的請(qǐng)求屬性添加到模型里。

spring.groovy.template.expose-session-attributes 在模型合并到模板前,是否要把所有的 HttpSession 屬性添加到模型里。

spring.groovy.template.expose-spring-macro-helpers 是否發(fā)布供Spring宏程序庫(kù)使用的 RequestContext ,并將其命名為 springMacro- RequestContext

spring.groovy.template.prefix 在構(gòu)建URL時(shí),添加到視圖名稱前的前綴。

spring.groovy.template.request-context-attribute 所有視圖里使用的 RequestContext 屬性的名稱。

spring.groovy.template.resource-loader-path 模板路徑(默認(rèn)值: classpath:/ templates/ 。)

spring.groovy.template.suffix 在構(gòu)建URL時(shí),添加到視圖名稱后的后綴。

spring.groovy.template.view-names 可解析的視圖名稱白名單。

H2

spring.h2.console.enabled 開啟控制臺(tái)。(默認(rèn)值: false 。)

spring.h2.console.path 可以找到控制臺(tái)的路徑。(默認(rèn)值: /h2-console 。)

Hornetq

spring.hornetq.embedded.cluster-password 集群密碼。默認(rèn)在啟動(dòng)時(shí)隨機(jī)生成。

spring.hornetq.embedded.data-directory 日志文件目錄。如果關(guān)閉了持久化功能則不需要該屬性。

spring.hornetq.embedded.enabled 如果有HornetQ服務(wù)器API,則開啟嵌入模式。(默認(rèn)值: true 。)

spring.hornetq.embedded.persistent 開啟持久化存儲(chǔ)。(默認(rèn)值: false 。)

spring.hornetq.embedded.queues 啟動(dòng)時(shí)要?jiǎng)?chuàng)建的隊(duì)列列表,用逗號(hào)分隔。(默認(rèn)值: [] 。)

spring.hornetq.embedded.server-id 服務(wù)器ID。默認(rèn)使用自增長(zhǎng)計(jì)數(shù)器。(默認(rèn)值: 0 。)

spring.hornetq.embedded.topics 啟動(dòng)時(shí)要?jiǎng)?chuàng)建的主題列表,用逗號(hào)分隔。(默認(rèn)值: [] 。)

spring.hornetq.host HornetQ的主機(jī)。(默認(rèn)值: localhost 。)

spring.hornetq.mode HornetQ的部署模式,默認(rèn)為自動(dòng)檢測(cè)。可以顯式地設(shè)置為 native 或 embedded 。

spring.hornetq.port HornetQ的端口。(默認(rèn)值: 5445 。)

Http

spring.http.converters.preferred-json-mapper HTTP消息轉(zhuǎn)換時(shí)優(yōu)先使用JSON映射器。

spring.http.encoding.charset HTTP請(qǐng)求和響應(yīng)的字符集。如果沒有顯式地指定 Content-Type 頭,則將該屬性值作為 這個(gè)頭的值。(默認(rèn)值: UTF-8 。)

spring.http.encoding.enabled 開啟HTTP編碼支持。(默認(rèn)值: true 。)

spring.http.encoding.force 強(qiáng)制將HTTP請(qǐng)求和響應(yīng)編碼為所配置的字符集。(默認(rèn)值: true 。)

Jackson

spring.jackson.date-format 日期格式字符串(yyyy-MM-dd HH:mm:ss)或日期格式類的全限定類名。

spring.jackson.deserialization 影響Java對(duì)象反序列化的Jackson on/off特性。

spring.jackson.generator 用于生成器的Jackson on/off特性。

spring.jackson.joda-date-time-format Joda日期時(shí)間格式字符串(yyyy-MM-dd HH:mm:ss)。如果沒有配置,而 date-format 又配置了一個(gè)格式字符串的話,會(huì)將它作為降級(jí)配置。

spring.jackson.locale 用于格式化的地域值。

spring.jackson.mapper Jackson的通用on/off特性。

spring.jackson.parser 用于解析器的Jackson on/off特性。

spring.jackson.property-naming-strategy Jackson的 PropertyNamingStrategy 中的一個(gè)常量( CAMEL_CASE_TO_LOWER_CASE_ WITH_UNDERSCORES )。也可以設(shè)置 PropertyNamingStrategy 的子類的全限定類名。

spring.jackson.serialization 影響Java對(duì)象序列化的Jackson on/off特性。

spring.jackson.serialization-inclusion 控制序列化時(shí)要包含哪些屬性。可選擇Jackson的 JsonInclude.Include 枚舉里的某個(gè)值。

spring.jackson.time-zone 格式化日期時(shí)使用的時(shí)區(qū)??梢耘渲酶鞣N可識(shí)別的時(shí)區(qū)標(biāo)識(shí)符,比如 America/Los_ Angeles 或者 GMT+10 。

Jersey

spring.jersey.filter.order Jersey過濾器鏈的順序。(默認(rèn)值: 0 。)

spring.jersey.init 通過Servlet或過濾器傳遞給Jersey的初始化參數(shù)。

spring.jersey.type Jersey集成類型。可以是 servlet 或者 filter 。

Jms

spring.jms.jndi-name 連接工廠的JNDI名字。設(shè)置了該屬性,則優(yōu)先于其他自動(dòng)配置的連接工廠。

spring.jms.listener.acknowledge-mode 容器的應(yīng)答模式(acknowledgment mode)。默認(rèn)情況下,監(jiān)聽器使用自動(dòng)應(yīng)答。

spring.jms.listener.auto-startup 啟動(dòng)時(shí)自動(dòng)啟動(dòng)容器。(默認(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 如果是主題而非隊(duì)列,指明默認(rèn)的目的地類型是否支持Pub/Sub。(默認(rèn)值: false 。)

Jmx

spring.jmx.default-domain JMX域名。

spring.jmx.enabled 將管理Bean發(fā)布到JMX域里。(默認(rèn)值: true 。)

spring.jmx.server MBeanServer 的Bean名稱。(默認(rèn)值: mbeanServer 。)

Jpa

spring.jpa.database 要操作的目標(biāo)數(shù)據(jù)庫(kù),默認(rèn)自動(dòng)檢測(cè)。也可以通過 databasePlatform 屬性進(jìn)行設(shè)置。

spring.jpa.database-platform 要操作的目標(biāo)數(shù)據(jù)庫(kù),默認(rèn)自動(dòng)檢測(cè)。也可以通過 Database 枚舉來設(shè)置。

spring.jpa.generate-ddl 啟動(dòng)時(shí)要初始化Schema。(默認(rèn)值: false 。)

spring.jpa.hibernate.ddl-auto DDL模式( none 、 validate 、 update 、 create 和 create-drop )。這是 hibernate. hbm2ddl.auto 屬性的一個(gè)快捷方式。在使用嵌入式數(shù)據(jù)庫(kù)時(shí),默認(rèn)為 create-drop ,其他情況下默認(rèn)為 none 。

spring.jpa.hibernate.naming-strategy Hibernate命名策略的全限定類名。

spring.jpa.open-in-view 注冊(cè) OpenEntityManagerInViewInterceptor ,在請(qǐng)求的整個(gè)處理過程中,將一個(gè)JPA EntityManager 綁定到線程上。(默認(rèn)值: true)

spring.jpa.propertiesJPA提供方要設(shè)置的額外原生屬性。

spring.jpa.show-sql 在使用Bitronix Transaction Manager時(shí)打開SQL語句日志。(默認(rèn)值: false 。)

Jta

spring.jta.allow-multiple-lrc 在使用Bitronix Transaction Manager時(shí),事務(wù)管理器是否應(yīng)該允許一個(gè)事務(wù)涉及多個(gè)LRC 資源。(默認(rèn)值: false)

spring.jta.asynchronous2-pc 在使用Bitronix Transaction Manager時(shí),是否異步執(zhí)行兩階段提交。(默認(rèn)值: false 。)

spring.jta.background-recovery-interval在使用Bitronix Transaction Manager時(shí),多久運(yùn)行一次恢復(fù)過程,單位為分鐘。(默認(rèn)值: 1 )

spring.jta.background-recovery-interval-seconds 在使用Bitronix Transaction Manager時(shí),多久運(yùn)行一次恢復(fù)過程,單位為秒。(默認(rèn)值: 60 )

spring.jta.current-node-only-recovery 在使用Bitronix Transaction Manager時(shí),恢復(fù)是否要濾除不包含本JVM唯一ID的XID。(默認(rèn)值: true )

spring.jta.debug-zero-resource-transaction 在使用Bitronix Transaction Manager時(shí),對(duì)于沒有涉及任何資源的事務(wù),是否要跟蹤并記 錄它們的創(chuàng)建和提交調(diào)用棧。(默認(rèn)值: false)

spring.jta.default-transaction-timeout 在使用Bitronix Transaction Manager時(shí),默認(rèn)的事務(wù)超時(shí)時(shí)間,單位為秒。(默認(rèn)值: 60 。)

spring.jta.disable-jmx 在使用Bitronix Transaction Manager時(shí),是否要禁止注冊(cè)JMX MBean。(默認(rèn)值: false 。)

spring.jta.enabled 開啟JTA支持。(默認(rèn)值: true 。)

spring.jta.exception-analyzer 在使用Bitronix Transaction Manager時(shí)用到的異常分析器。設(shè)置為 null 時(shí)使用默認(rèn)異常分析器,也可以設(shè)置自定義異常分析器的全限定類名。

spring.jta.filter-log-status 在使用Bitronix Transaction Manager時(shí),是否只記錄必要的日志。開啟該參數(shù)時(shí)能減少分 段(fragment)空間用量,但調(diào)試更復(fù)雜了。(默認(rèn)值: false)

spring.jta.force-batching-enabled 在使用Bitronix Transaction Manager時(shí),是否批量輸出至磁盤。禁用批處理會(huì)嚴(yán)重降低事 務(wù)管理器的吞吐量。(默認(rèn)值: true 。)

spring.jta.forced-write-enabled 在使用Bitronix Transaction Manager時(shí),日志是否強(qiáng)制寫到磁盤上。在生產(chǎn)環(huán)境里不要設(shè) 置為 false ,因?yàn)椴粡?qiáng)制寫到磁盤上無法保證完整性。(默認(rèn)值: true)

spring.jta.graceful-shutdown-interval 在使用Bitronix Transaction Manager時(shí),要關(guān)閉的話,事務(wù)管理器在放棄事務(wù)前最多等它 多少秒。(默認(rèn)值: 60)

spring.jta.jndi-transaction-synchronization-registry-name 在使用Bitronix Transaction Manager時(shí),事務(wù)同步注冊(cè)表應(yīng)該綁定到哪個(gè)JNDI下。(默認(rèn) 值: java:comp/TransactionSynchronizationRegistry)

spring.jta.jndi-user-transaction-name 在使用Bitronix Transaction Manager時(shí),用戶事務(wù)應(yīng)該綁定到哪個(gè)JNDI下。(默認(rèn)值: java:comp/UserTransaction 。)

spring.jta.journal 在使用Bitronix Transaction Manager時(shí),要用的日志名??梢允?disk 、 null 或者全限定類 名。(默認(rèn)值: disk 。)

spring.jta.log-dir 事務(wù)日志目錄。

spring.jta.log-part1-filename 日志分段文件1的名稱。(默認(rèn)值: btm1.tlog 。)

spring.jta.log-part2-filename 日志分段文件2的名稱。(默認(rèn)值: btm2.tlog 。)

spring.jta.max-log-size-in-mb 在使用Bitronix Transaction Manager時(shí),日志分段文件的最大兆數(shù)。日志越大,事務(wù)就被 允許在未終結(jié)狀態(tài)停留越長(zhǎng)時(shí)間。但是,如果文件大小限制得太小,事務(wù)管理器在分段 滿了的時(shí)候就會(huì)暫停更長(zhǎng)時(shí)間。(默認(rèn)值: 2 。)

spring.jta.resource-configuration-filename Bitronix Transaction Manager的配置文件名。

spring.jta.server-id 唯一標(biāo)識(shí)Bitronix Transaction Manager實(shí)例的ID。

spring.jta.skip-corrupted-logs 是否跳過損壞的日志文件。(默認(rèn)值: false 。)

spring.jta.transaction-manager-id 事務(wù)管理器的唯一標(biāo)識(shí)符。

spring.jta.warn-about-zero-resource-transaction 在使用Bitronix Transaction Manager時(shí),是否要對(duì)執(zhí)行時(shí)沒有涉及任何資源的事務(wù)作出告 警。(默認(rèn)值: true 。)

Mail

spring.mail.default-encoding 默認(rèn)的 MimeMessage 編碼。(默認(rèn)值: UTF-8 。)

spring.mail.host SMTP服務(wù)器主機(jī)地址。

spring.mail.jndi-name會(huì)話的JNDI名稱。設(shè)置之后,該屬性的優(yōu)先級(jí)要高于其他郵件設(shè)置。

spring.mail.password SMTP服務(wù)器的登錄密碼。

spring.mail.port SMTP服務(wù)器的端口號(hào)。

spring.mail.properties 附加的JavaMail會(huì)話屬性。

spring.mail.protocol SMTP服務(wù)器用到的協(xié)議。(默認(rèn)值: smtp 。)

spring.mail.test-connection 在啟動(dòng)時(shí)測(cè)試郵件服務(wù)器是否可用。(默認(rèn)值: false 。)

spring.mail.username SMTP服務(wù)器的登錄用戶名。

Messages

spring.messages.basename 逗號(hào)分隔的基本名稱列表,都遵循 ResourceBundle 的慣例。本質(zhì)上這就是一個(gè)全限定 的Classpath位置,如果不包含包限定符(比如 org.mypackage ),就會(huì)從Classpath的根部開始解析。(默認(rèn)值: messages 。)

spring.messages.cache-seconds 加載的資源包文件的緩存失效時(shí)間,單位為秒。在設(shè)置為 -1 時(shí),包會(huì)永遠(yuǎn)緩存。(默認(rèn)值: -1 。)

spring.messages.encoding消息包的編碼。(默認(rèn)值: UTF-8 。)

Mobile

spring.mobile.devicedelegatingviewresolver.enable-fallback 開啟降級(jí)解析支持。(默認(rèn)值: false 。)

spring.mobile.devicedelegatingviewresolver.enabled 開啟設(shè)備視圖解析器。(默認(rèn)值: false 。)

spring.mobile.devicedelegatingviewresolver.mobile-prefix 添加到移動(dòng)設(shè)備視圖名前的前綴。(默認(rèn)值: mobile/ 。)

spring.mobile.devicedelegatingviewresolver.mobile-suffix 添加到移動(dòng)設(shè)備視圖名后的后綴。

spring.mobile.devicedelegatingviewresolver.normal-prefix 添加到普通設(shè)備視圖名前的前綴。

spring.mobile.devicedelegatingviewresolver.normal-suffix 添加到普通設(shè)備視圖名后的后綴。

spring.mobile.devicedelegatingviewresolver.tablet-prefix添加到平板設(shè)備視圖名前的前綴。(默認(rèn)值: tablet/ 。)

spring.mobile.devicedelegatingviewresolver.tablet-suffix 添加到平板設(shè)備視圖名后的后綴。

spring.mobile.sitepreference.enabled 開啟 SitePreferenceHandler 。(默認(rèn)值: true 。)

Mongodb

spring.mongodb.embedded.features要開啟的特性列表,用逗號(hào)分隔。

spring.mongodb.embedded.version 要使用的Mongo版本。(默認(rèn)值: 2.6.10 。)

Mustache

spring.mustache.cache 開啟模板緩存。

spring.mustache.charset 模板編碼。

spring.mustache.check-template-location 檢查模板位置是否存在。

spring.mustache.content-type Content-Type 的值。

spring.mustache.enabled 開啟Mustache的MVC視圖解析。

spring.mustache.prefix添加到模板名前的前綴。(默認(rèn)值: classpath:/ templates/ 。)

spring.mustache.suffix 添加到模板名后的后綴。(默認(rèn)值: .html 。)

spring.mustache.view-names 可解析的視圖名稱的白名單。

Mvc

spring.mvc.async.request-timeout 異步請(qǐng)求處理超時(shí)前的等待時(shí)間(單位為毫秒)。如果沒有設(shè)置該屬性,則使用底層實(shí)現(xiàn) 的默認(rèn)超時(shí)時(shí)間,比如,Tomcat上使用Servlet 3時(shí)超時(shí)時(shí)間為10秒。

spring.mvc.date-format 要使用的日期格式(比如 dd/MM/yyyy )。

spring.mvc.favicon.enabled 開啟favicon.ico的解析。(默認(rèn)值: true 。)

spring.mvc.ignore-default-model-on-redirect 在重定向的場(chǎng)景下,是否要忽略“默認(rèn)”模型對(duì)象的內(nèi)容。(默認(rèn)值: true 。)

spring.mvc.locale 要使用的地域配置。

spring.mvc.message-codes-resolver-format 消息代碼格式( PREFIX_ERROR_CODE 、 POSTFIX_ERROR_CODE )。

spring.mvc.view.prefix Spring MVC視圖前綴。

spring.mvc.view.suffix Spring MVC視圖后綴。

Rabbitmq

spring.rabbitmq.addresses 客戶端應(yīng)該連接的地址列表,用逗號(hào)分隔。

spring.rabbitmq.dynamic 創(chuàng)建一個(gè) AmqpAdmin Bean。(默認(rèn)值: true 。)

spring.rabbitmq.host RabbitMQ主機(jī)地址。(默認(rèn)值: localhost 。)

spring.rabbitmq.listener.acknowledge-mode 容器的應(yīng)答模式。

spring.rabbitmq.listener.auto-startup 啟動(dòng)時(shí)自動(dòng)開啟容器。(默認(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)求里要處理的消息數(shù)。該數(shù)值不應(yīng)小于事務(wù)數(shù)(如果用到的話)。

spring.rabbitmq.listener.transaction-size 一個(gè)事務(wù)里要處理的消息數(shù)。為了保證效果,應(yīng)該不大于預(yù)先獲取的數(shù)量。

spring.rabbitmq.password進(jìn)行身份驗(yàn)證的密碼。

spring.rabbitmq.port RabbitMQ端口。(默認(rèn)值: 5672 。)

spring.rabbitmq.requested-heartbeat 請(qǐng)求心跳超時(shí),單位為秒; 0 表示不啟用心跳。

spring.rabbitmq.ssl.enabled 開啟SSL支持。(默認(rèn)值: false 。)

spring.rabbitmq.ssl.key-store 持有SSL證書的KeyStore路徑。

spring.rabbitmq.ssl.key-store-password 訪問KeyStore的密碼。

spring.rabbitmq.ssl.trust-store 持有SSL證書的TrustStore。

spring.rabbitmq.ssl.trust-store-password 訪問TrustStore的密碼。

spring.rabbitmq.username 進(jìn)行身份驗(yàn)證的用戶名。

spring.rabbitmq.virtual-host 在連接RabbitMQ時(shí)的虛擬主機(jī)。

Redis

spring.redis.database 連接工廠使用的數(shù)據(jù)庫(kù)索引。(默認(rèn)值: 0 。)

spring.redis.host Redis服務(wù)器主機(jī)地址。(默認(rèn)值: localhost 。)

spring.redis.passwordRedis服務(wù)器的登錄密碼。

spring.redis.pool.max-active連接池在指定時(shí)間里能分配的最大連接數(shù)。負(fù)數(shù)表示無限制。(默認(rèn)值: 8 。)

spring.redis.pool.max-idle 連接池里的最大空閑連接數(shù)。負(fù)數(shù)表示空閑連接數(shù)可以是無限大。(默認(rèn)值: 8 。)

spring.redis.pool.max-wait當(dāng)連接池被耗盡時(shí),分配連接的請(qǐng)求應(yīng)該在拋出異常前被阻塞多長(zhǎng)時(shí)間(單位為秒)。負(fù) 數(shù)表示一直阻塞。(默認(rèn)值: -1 。)

spring.redis.pool.min-idle 連接池里要維持的最小空閑連接數(shù)。該屬性只有在設(shè)置為正數(shù)時(shí)才有效。(默認(rèn)值: 0 。)

spring.redis.port Redis服務(wù)器端口。(默認(rèn)值: 6379 。)

spring.redis.sentinel.master Redis服務(wù)器的名字。

spring.redis.sentinel.nodes形如“主機(jī):端口”配對(duì)的列表,用逗號(hào)分隔。

spring.redis.timeout 連接超時(shí)時(shí)間,單位為秒。(默認(rèn)值: 0 。)

Resources

spring.resources.add-mappings 開啟默認(rèn)資源處理。(默認(rèn)值: true 。)

spring.resources.cache-period 資源處理器對(duì)資源的緩存周期,單位為秒。

spring.resources.chain.cache 對(duì)資源鏈開啟緩存。(默認(rèn)值: true 。)

spring.resources.chain.enabled 開啟Spring資源處理鏈。(默認(rèn)關(guān)閉的,除非至少開啟了一個(gè)策略。)

spring.resources.chain.html-application-cache 開啟HTML5應(yīng)用程序緩存證明重寫。(默認(rèn)值: false 。)

spring.resources.chain.strategy.content.enabled 開啟內(nèi)容版本策略。(默認(rèn)值: false 。)

spring.resources.chain.strategy.content.paths 要運(yùn)用于版本策略的模式列表,用逗號(hào)分隔。(默認(rèn)值: [/**] 。)

spring.resources.chain.strategy.fixed.enabled開啟固定版本策略。(默認(rèn)值: false 。)

spring.resources.chain.strategy.fixed.paths要運(yùn)用于固定版本策略的模式列表,用逗號(hào)分隔。

spring.resources.chain.strategy.fixed.version 用于固定版本策略的版本字符串。

spring.resources.static-locations 靜態(tài)資源位置。默認(rèn)為 classpath: [/META-INF/resources/, /resources/, /static/, /public/] 加上context:/(Servlet上下文的根目錄)。

SendGrid

spring.sendgrid.password SendGrid密碼。

spring.sendgrid.proxy.host SendGrid代理主機(jī)地址。

spring.sendgrid.proxy.port SendGrid代理端口。

spring.sendgrid.username SendGrid用戶名。

Social

spring.social.auto-connection-views 針對(duì)所支持的提供方開啟連接狀態(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)用程序的密鑰。

Thymeleaf

spring.thymeleaf.cache開啟模板緩存。(默認(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 要被排除在解析之外的視圖名稱列表,用逗號(hào)分隔。

spring.thymeleaf.mode 要運(yùn)用于模板之上的模板模式。另見 StandardTemplate- ModeHandlers 。(默認(rèn)值: HTML5 。)

spring.thymeleaf.prefix 在構(gòu)建URL時(shí)添加到視圖名稱前的前綴。(默認(rèn)值: classpath:/templates/ 。)

spring.thymeleaf.suffix 在構(gòu)建URL時(shí)添加到視圖名稱后的后綴。(默認(rèn)值: .html 。)

spring.thymeleaf.template-resolver-order Thymeleaf模板解析器在解析器鏈中的順序。默認(rèn)情況下,它排在第一位。順序從1開始只有在定義了額外的 TemplateResolver Bean時(shí)才需要設(shè)置這個(gè)屬性。

spring.thymeleaf.view-names 可解析的視圖名稱列表,用逗號(hào)分隔。

Velocity

spring.velocity.allow-request-override HttpServletRequest 的屬性是否允許覆蓋(隱藏)控制器生成的同名模型屬性。

spring.velocity.allow-session-override HttpSession`的屬性是否允許覆蓋(隱藏)控制器生成的同名模型屬性。

spring.velocity.cache 開啟模板緩存。

spring.velocity.charset 模板編碼。

spring.velocity.check-template-location 檢查模板位置是否存在。

spring.velocity.content-type Content-Type 的值。

spring.velocity.date-tool-attribute DateTool 輔助對(duì)象在視圖的Velocity上下文里呈現(xiàn)的名字。

spring.velocity.enabled 開啟Velocity的MVC視圖解析。

spring.velocity.expose-request-attributes 在模型合并到模板前,是否要把所有的請(qǐng)求屬性添加到模型里。

spring.velocity.expose-session-attributes 在模型合并到模板前,是否要把所有的 HttpSession 屬性添加到模型里。

spring.velocity.expose-spring-macro-helpers 是否發(fā)布供Spring宏程序庫(kù)使用的 RequestContext ,并將其名命為 springMacro- RequestContext 。

spring.velocity.number-tool-attribute NumberTool 輔助對(duì)象在視圖的Velocity上下文里呈現(xiàn)的名字。

spring.velocity.prefer-file-system-access 加載模板時(shí)優(yōu)先通過文件系統(tǒng)訪問。文件系統(tǒng)訪問能夠?qū)崟r(shí)檢測(cè)到模板變更。(默認(rèn)值: true 。)

spring.velocity.prefix在構(gòu)建URL時(shí)添加到視圖名稱前的前綴。

spring.velocity.properties 額外的Velocity屬性。

spring.velocity.request-context-attribute所有視圖里使用的 Request- Context 屬性的名稱。

spring.velocity.resource-loader-path 模板路徑。(默認(rèn)值: classpath:/ templates/ 。)

spring.velocity.suffix 在構(gòu)建URL時(shí)添加到視圖名稱后的后綴。

spring.velocity.toolbox-config-location Velocity Toolbox的配置位置,比如/WEB-INF/toolbox.xml。自動(dòng)加載Velocity Tools工具定 義文件,將所定義的全部工具發(fā)布到指定的作用域內(nèi)。

spring.velocity.view-names可解析的視圖名稱白名單。

View

spring.view.prefix Spring MVC視圖前綴。

spring.view.suffixSpring MVC視圖后綴。

其它

spring.aop.auto 添加@EnableAspectJAutoProxy(默認(rèn):true)

spring.application.admin.enabled開啟應(yīng)用程序的管理功能(默認(rèn):false)

spring.artemis.embedded.cluster-password 集群密碼。默認(rèn)在啟東市隨機(jī)生成

spring.artemis.embedded.persistent開啟持久化存儲(chǔ)(默認(rèn):false)

spring.autoconfigure.exclude 要排除的自動(dòng)配置類

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容