這些屬性是否生效取決于對應(yīng)的組件是否聲明為 Spring 應(yīng)用程序上下文里的 Bean(基本是自動配置的),為一個不生效的組件設(shè)置屬性是沒有用的。
multipart
multipart.enabled
開啟上傳支持(默認:true)
multipart.file-size-threshold
: 大于該值的文件會被寫到磁盤上
multipart.location
上傳文件存放位置
multipart.max-file-size
最大文件大小
multipart.max-request-size
最大請求大小
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
針對 jsp 使用的 Servlet 類名(默認:org.apache.jasper.servlet.JspServlet)
server.jsp-servlet.registered
JspServelt 是否要注冊到內(nèi)嵌的 Servlet 容器里(默認 true)
server.jsp-servlet.init-parameters[param name]
設(shè)置 Jsp Servlet 初始化參數(shù)
server.servlet-path
主分發(fā)器 Servlet 的路徑(默認:/)
Session
server.session.cookie.domain
回話 Cookie 的域
server.session.cookie.comment
Cookie 注釋
server.session.cookie.max-age
Cookie 最大保存時間(單位 s)
server.session.cookie.name
Cookie 名稱
server.session.cookie.timeout
超時時間
tomcat
server.tomcat.accesslog.directory
創(chuàng)建日志文件的目錄
server.tomcat.accesslog.enabled
是否開啟訪問日志(默認:false)
server.tomcat.accesslog.pattern
訪問日志的格式(默認:common)
server.tomcat.accesslog.prefix
日志名前綴(默認:access_log)
server.tomcat.accesslog.suffix
日志名后綴(默認:.log)
server.tomcat.max-http-header-size
Http 消息頭最大字節(jié)數(shù)(默認:0)
server.tomcat.uri-encoding
用來解碼 URI 的字符編碼
Cache
spring.cache.cache-names
如果底層緩存管理器支持緩存名的話,可以在這里指定要創(chuàng)建的緩存名列表,用逗號分 隔。通常這會禁用運行時創(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
用來初始化緩存管理器的配置文件的位置,配置文件依賴于底層的緩存實現(xiàn)
spring.cache.jcache.provider CachingProvider
實現(xiàn)的全限定類名,用來獲取 JSR-107 兼容的緩存管理器,僅在 Classpath 里有不只一個 JSR-107 實現(xiàn)時才需要這個屬性。
spring.cache.type
緩存類型,默認根據(jù)環(huán)境自動檢測
Data
spring.data.jpa.repositories.enabled
開啟 JPA 倉庫(默認:true)
spring.data.mongodb.authentication-database
身份認證數(shù)據(jù)庫名
spring.data.mongodb.database
數(shù)據(jù)庫名
spring.data.mongodb.field-naming-strategy
要使用的 FieldNamingStrategy 的全限定名。
spring.data.mongodb.grid.fs.database
GridFS 數(shù)據(jù)庫名稱
spring.data.mongodb.host
MongoDB 服務(wù)器地址
spring.data.mongodb.username
MongoDB 賬號
spring.data.mongodb.password
MongoDB 密碼
spring.data.mongodb.port
端口號
spring.data.mongodb.repositories.enabled
開啟 Mongo 倉庫(默認值:true)
spring.data.mongodb.uri
Mongo 數(shù)據(jù)庫 URI。設(shè)置了該屬性后就主機和端口號會被忽略。(默認值: mongodb:// localhost/test)
spring.data.rest.base-path
用于發(fā)布倉庫資源的基本路徑
spring.data.rest.default-page-size
分頁數(shù)據(jù)的默認頁大?。J:20)
spring.data.rest.limit-param-name
用于標識一次返回多少記錄的 URL 查詢字符串參數(shù)名。(默認值: size )
spring.data.rest.max-page-sieze
: 最大分頁大?。J:1000)
spring.data.rest.page-param-name
URL 查詢字符串參數(shù)的名稱,用來標識返回哪一頁。(默認值: page )
spring.data.rest.return-body-on-create
在創(chuàng)建實體后是否返回一個響應(yīng)體(默認:false)
spring.data.rest.return-body-on-update
在更新實體后是否返回一個響應(yīng)體(默認:false)
spring.data.rest.sort-param-name
URL 查詢字符串參數(shù)的名稱,用來表示結(jié)果排序的方向(默認:name)
spring.data.solr.host
Solr 的主機地址。如果設(shè)置了 zk-host 則忽略該屬性。(默認值: http://127.0.0.1: 8983/solr )
spring.data.solr.repositories.enabled
開啟 solr 倉庫(默認:true)
spring.data.solr.zk-host
zk 主機地址,格式為 "主機 - 端口"
spring.datasource.allow-pool-suspension
是否允許池暫停(pool suspension)。在開啟池暫停后會有性能會受到一定影響,除非你 真的需要這個功能(例如在冗余的系統(tǒng)下),否則不要開啟它。該屬性只在使用 Hikari 數(shù) 據(jù)庫連接池時有用。(默認值: false 。)
DataSource
spring.datasource.name
數(shù)據(jù)源的名稱。
spring.datasource.username
數(shù)據(jù)庫的登錄用戶名。
spring.datasource.password
數(shù)據(jù)庫的登錄密碼。
spring.datasource.url
數(shù)據(jù)庫的 JDBC URL。
spring.datasource.jdbc-url
用來創(chuàng)建連接的 JDBC URL。
spring.datasource.driver-class-name
JDBC 驅(qū)動的全限定類名。默認根據(jù) URL 自動檢測。
spring.datasource.pool-name
連接池名稱。
spring.datasource.max-active
連接池中的最大活躍連接數(shù)。
spring.datasource.connection-timeout
連接超時(單位毫秒)
spring.datasource.max-age
連接池中連接的最長壽命。
spring.datasource.max-idle
連接池中的最大空閑連接數(shù)。
spring.datasource.max-lifetime
連接池中連接的最長壽命(單位為毫秒)。
spring.datasource.max-open-prepared-statements
開啟狀態(tài)的 PreparedStatement 的數(shù)量上限。
spring.datasource.max-wait
連接池在等待返回連接時,最長等待多少毫秒再拋出異常。
spring.datasource.maximum-pool-size
連接池能達到的最大規(guī)模,包含空閑連接的數(shù)量和使用中的連接數(shù)量。
spring.datasource.min-evictable-idle-time-millis
一個空閑連接被空閑連接釋放器(如果存在的話)優(yōu)雅地釋放前,最短會在連接池里停 留多少時間。
spring.datasource.min-idle
連接池里始終應(yīng)該保持的最小連接數(shù)。(用于 DBCP 和 Tomcat 連接池。)
spring.datasource.minimum-idle
: HikariCP 試圖在連接池里維持的最小空閑連接數(shù)。
spring.datasource.alternate-username-allowed
是否允許其它用戶名
spring.datasource.auto-commit
更新操作是否自動提交
spring.datasource.abandon-when-percentage-full
一個百分比形勢的閾值,超過該閾值則關(guān)閉并報告被棄用的連接
spring.datasource.catalog
默認的 Catalog 名稱
spring.datasource.commit-on-return
在連接歸還時,連接池是否要提交掛起的事務(wù)
spring.datasource.connection-init-sql
在所有新連接創(chuàng)建時都會執(zhí)行的 SQL 語句,該語句會在連接加入連接池前執(zhí)行。
spring.datasource.connection-init-sqls
在物理連接第一次創(chuàng)建時執(zhí)行的 SQL 語句列表。(用于 DBCP 連接池。)
spring.datasource.connection-properties.[key]
設(shè)置創(chuàng)建連接時使用的屬性。(用于 DBCP 連接池。)
spring.datasource.continue-on-error
初始化數(shù)據(jù)庫時發(fā)生錯誤不要終止。(默認值: false)
spring.datasource.data
指向數(shù)據(jù)(數(shù)據(jù)庫操縱語言,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ù)源時使用的屬性。(用于 Hikari 連接池。)
spring.datasource.db-properties
設(shè)置創(chuàng)建數(shù)據(jù)源時使用的屬性。(用于 Tomcat 連接池。)
spring.datasource.default-auto-commit
連接上的操作是否自動提交。
spring.datasource.default-catalog
連接的默認 Catalog。
spring.datasource.default-read-only
連接的默認只讀狀態(tài)。
spring.datasource.default-transaction-isolation
連接的默認事務(wù)隔離級別。
spring.datasource.fair-queue
是否以 FIFO 方式返回連接。
spring.datasource.health-check-properties.[key]
設(shè)置要納入健康檢查的屬性。(用于 Hikari 連接池。)
spring.datasource.idle-timeout
連接池中的連接能保持閑置狀態(tài)的最長時間,單位為毫秒。(默認值: 10 。)
spring.datasource.ignore-exception-on-pre-load
初始化數(shù)據(jù)庫連接池時是否要忽略連接。
spring.datasource.init-sql
在連接第一次創(chuàng)建時運行的自定義查詢。
spring.datasource.initial-size
在連接池啟動時要建立的連接數(shù)。
spring.datasource.initialization-fail-fast
在連接池創(chuàng)建時,如果達不到最小連接數(shù)是否要拋出異常。(默認值: true 。)
spring.datasource.initialize
使用 data.sql 初始化數(shù)據(jù)庫。(默認值: true 。)
spring.datasource.isolate-internal-queries
是否要隔離內(nèi)部請求。(默認值: false 。)
spring.datasource.jdbc-interceptors
一個分號分隔的類名列表,這些類都擴展了 JdbcInterceptor 類。這些攔截器會插入 java.sql.Connection 對象的操作鏈里。(用于 Tomcat 連接池。)
spring.datasource.jmx-enabled
開啟 JMX 支持(如果底層連接池提供該功能的話)。(默認值: false 。)
spring.datasource.jndi-name
數(shù)據(jù)源的 JNDI 位置。設(shè)置了該屬性則忽略類、URL、用戶名和密碼屬性。
spring.datasource.leak-detection-threshold
用來檢測 Hikari 連接池連接泄露的閾值,單位為毫秒。
spring.datasource.log-abandoned
是否針對棄用語句或連接的應(yīng)用程序代碼記錄下跟蹤棧。用于 DBCP 連接池。(默認值: false 。)
spring.datasource.log-validation-errors
在使用 Tomcat 連接池時是否要記錄驗證錯誤。
spring.datasource.login-timeout
連接數(shù)據(jù)庫的超時時間(單位為秒)。
spring.datasource.num-tests-per-eviction-run
空閑對象釋放器線程(如果存在的話)每次運行時要檢查的對象數(shù)。
spring.datasource.platform
在 Schema 資源(schema-${platform}.sql)里要使用的平臺。(默認值: all 。)
spring.datasource.pool-prepared-statements
是否要將 Statement 放在池里。
spring.datasource.propagate-interrupt-state
對于等待連接的中斷線程,是否要傳播中斷狀態(tài)。
spring.datasource.read-only
在使用 Hikari 連接池時將數(shù)據(jù)源設(shè)置為只讀。
spring.datasource.register-mbeans
Hikari 連接池是否要注冊 JMX MBean。
spring.datasource.remove-abandoned
被棄用的連接在到達棄用超時后是否應(yīng)該被移除。
spring.datasource.remove-abandoned-timeout
連接在多少秒后應(yīng)該考慮棄用。
spring.datasource.rollback-on-return
在連接歸還連接池時,是否要回滾掛起的事務(wù)。
spring.datasource.schema
Schema(數(shù)據(jù)定義語言,Data Definition Language,DDL)腳本資源的引用。
spring.datasource.separator
SQL 初始化腳本里的語句分割符。(默認值: ; 。)
spring.datasource.sql-script-encoding
SQL 腳本的編碼。
spring.datasource.suspect-timeout
在記錄一個疑似棄用連接前要等待多少秒。
spring.datasource.test-on-borrow
從連接池中借用連接時是否要進行測試。
spring.datasource.test-on-connect
在建立連接時是否要進行測試。
spring.datasource.test-on-return
在將連接歸還到連接池時是否要進行測試。
spring.datasource.test-while-idle
在連接空閑時是否要進行測試。
spring.datasource.time-between-eviction-runs-millis
在兩次空閑連接驗證、棄用連接清理和空閑池大小調(diào)整之間睡眠的毫秒數(shù)。
spring.datasource.transaction-isolation
在使用 Hikari 連接池時設(shè)置默認事務(wù)隔離級別。
spring.datasource.use-disposable-connection-facade
連接是否要用一個門面(facade)封裝起來,在調(diào)用了 Connection.close() 后就不能 再使用這個連接了。
spring.datasource.use-equals
在比較方法名時是否使用 String.equals() 來代替 == 。
spring.datasource.use-lock
在操作連接對象時是否要加鎖。
spring.datasource.validation-interval
執(zhí)行連接驗證的間隔時間,單位為毫秒。
spring.datasource.validation-query
在連接池里的連接返回給調(diào)用者或連接池時,要執(zhí)行的驗證 SQL 查詢。
spring.datasource.validation-query-timeout
在連接驗證查詢執(zhí)行失敗前等待的超時時間,單位為秒。
spring.datasource.validation-timeout
在連接驗證失敗前等待的超時時間,單位為秒。(用于 Hikari 連接池。)
spring.datasource.validator-class-name
可選驗證器類的全限定類名,用于執(zhí)行測試查詢。
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
在模型合并到模板前,是否要把所有的請求屬性添加到模型里。
spring.freemarker.expose-session-attributes
在模型合并到模板前,是否要把所有的 HttpSession 屬性添加到模型里。
spring.freemarker.expose-spring-macro-helpers
是否發(fā)布供 Spring 宏程序庫使用的 RequestContext ,并將命其名為 springMacro- RequestContext
spring.freemarker.prefer-file-system-access
加載模板時優(yōu)先通過文件系統(tǒng)訪問。文件系統(tǒng)訪問能夠?qū)崟r檢測到模板變更。(默認值: true 。)
spring.freemarker.prefix
在構(gòu)建 URL 時添加到視圖名稱前的前綴。
spring.freemarker.request-context-attribute
在所有視圖里使用的 RequestContext 屬性的名稱。
spring.freemarker.settings
要傳遞給 FreeMarker 配置的各種鍵。
spring.freemarker.suffix
在構(gòu)建 URL 時添加到視圖名稱后的后綴。
spring.freemarker.template-loader-path
模板路徑列表,用逗號分隔。(默認值: ["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)時是否要做轉(zhuǎn)義。(默認值: false 。)
spring.groovy.template.configuration.auto-indent
模板是否要自動呈現(xiàn)縮進。(默認值: false 。)
spring.groovy.template.configuration.auto-indent-string
開啟自動縮進時用于縮進的字符串,可以是 SPACES ,也可以是 TAB 。(默認值: SPACES 。)
spring.groovy.template.configuration.auto-new-line
模板里是否要呈現(xiàn)新的空行。(默認值: false 。)
spring.groovy.template.configuration.base-template-class
模板基類。
spring.groovy.template.configuration.cache-templates
模板是否應(yīng)該緩存。(默認值: true 。)
spring.groovy.template.configuration.declaration-encoding
用來寫聲明頭的編碼。
spring.groovy.template.configuration.expand-empty-elements
沒有正文的元素該用短形式(例如, )還是擴展形式(例如, )來書 寫。(默認值: false)
spring.groovy.template.configuration.locale
設(shè)置模板地域。
spring.groovy.template.configuration.new-line-string
在自動空行開啟后用來呈現(xiàn)空行的字符串。(默認為系統(tǒng)的 line.separator 屬性值。)
spring.groovy.template.configuration.resource-loader-path
Groovy 模板的路徑。(默認值: classpath:/templates/ 。)
spring.groovy.template.configuration.use-double-quotes
屬性是該用雙引號還是單引號。(默認值: false 。)
spring.groovy.template.content-type
Content-Type 的值。
spring.groovy.template.enabled
開啟 Groovy 模板的 MVC 視圖解析。
spring.groovy.template.expose-request-attributes
在模型合并到模板前,是否要把所有的請求屬性添加到模型里。
spring.groovy.template.expose-session-attributes
在模型合并到模板前,是否要把所有的 HttpSession 屬性添加到模型里。
spring.groovy.template.expose-spring-macro-helpers
是否發(fā)布供 Spring 宏程序庫使用的 RequestContext ,并將其命名為 springMacro- RequestContext
spring.groovy.template.prefix
在構(gòu)建 URL 時,添加到視圖名稱前的前綴。
spring.groovy.template.request-context-attribute
所有視圖里使用的 RequestContext 屬性的名稱。
spring.groovy.template.resource-loader-path
模板路徑(默認值: classpath:/ templates/ 。)
spring.groovy.template.suffix
在構(gòu)建 URL 時,添加到視圖名稱后的后綴。
spring.groovy.template.view-names
可解析的視圖名稱白名單。
H2
spring.h2.console.enabled
開啟控制臺。(默認值: false 。)
spring.h2.console.path
可以找到控制臺的路徑。(默認值: /h2-console 。)
Hornetq
spring.hornetq.embedded.cluster-password
集群密碼。默認在啟動時隨機生成。
spring.hornetq.embedded.data-directory
日志文件目錄。如果關(guān)閉了持久化功能則不需要該屬性。
spring.hornetq.embedded.enabled
如果有 HornetQ 服務(wù)器 API,則開啟嵌入模式。(默認值: true 。)
spring.hornetq.embedded.persistent
開啟持久化存儲。(默認值: false 。)
spring.hornetq.embedded.queues
啟動時要創(chuàng)建的隊列列表,用逗號分隔。(默認值: [] 。)
spring.hornetq.embedded.server-id
服務(wù)器 ID。默認使用自增長計數(shù)器。(默認值: 0 。)
spring.hornetq.embedded.topics
啟動時要創(chuàng)建的主題列表,用逗號分隔。(默認值: [] 。)
spring.hornetq.host
HornetQ 的主機。(默認值: localhost 。)
spring.hornetq.mode
HornetQ 的部署模式,默認為自動檢測??梢燥@式地設(shè)置為 native 或 embedded 。
spring.hornetq.port
HornetQ 的端口。(默認值: 5445 。)
Http
spring.http.converters.preferred-json-mapper
HTTP 消息轉(zhuǎn)換時優(yōu)先使用 JSON 映射器。
spring.http.encoding.charset
HTTP 請求和響應(yīng)的字符集。如果沒有顯式地指定 Content-Type 頭,則將該屬性值作為 這個頭的值。(默認值: UTF-8 。)
spring.http.encoding.enabled
開啟 HTTP 編碼支持。(默認值: true 。)
spring.http.encoding.force
強制將 HTTP 請求和響應(yīng)編碼為所配置的字符集。(默認值: true 。)
Jackson
spring.jackson.date-format
日期格式字符串(yyyy-MM-dd HH:mm:ss)或日期格式類的全限定類名。
spring.jackson.deserialization
影響 Java 對象反序列化的 Jackson on/off 特性。
spring.jackson.generator
用于生成器的 Jackson on/off 特性。
spring.jackson.joda-date-time-format
Joda 日期時間格式字符串(yyyy-MM-dd HH:mm:ss)。如果沒有配置,而 date-format 又配置了一個格式字符串的話,會將它作為降級配置。
spring.jackson.local
e 用于格式化的地域值。
spring.jackson.mapper
Jackson 的通用 on/off 特性。
spring.jackson.parser
用于解析器的 Jackson on/off 特性。
spring.jackson.property-naming-strategy
Jackson 的 PropertyNamingStrategy 中的一個常量( CAMEL_CASE_TO_LOWERCASE WITH_UNDERSCORES )。也可以設(shè)置 PropertyNamingStrategy 的子類的全限定類名。
spring.jackson.serialization
影響 Java 對象序列化的 Jackson on/off 特性。
spring.jackson.serialization-inclusion
控制序列化時要包含哪些屬性。可選擇 Jackson 的 JsonInclude.Include 枚舉里的某個值。
spring.jackson.time-zone
格式化日期時使用的時區(qū)??梢耘渲酶鞣N可識別的時區(qū)標識符,比如 America/Los_ Angeles 或者 GMT+10 。
Jersey
spring.jersey.filter.order
Jersey 過濾器鏈的順序。(默認值: 0 。)
spring.jersey.init
通過 Servlet 或過濾器傳遞給 Jersey 的初始化參數(shù)。
spring.jersey.type
Jersey 集成類型??梢允?servlet 或者 filter 。
Jms
spring.jms.jndi-name
連接工廠的 JNDI 名字。設(shè)置了該屬性,則優(yōu)先于其他自動配置的連接工廠。
spring.jms.listener.acknowledge-mode
容器的應(yīng)答模式(acknowledgment mode)。默認情況下,監(jiān)聽器使用自動應(yīng)答。
spring.jms.listener.auto-startup
啟動時自動啟動容器。(默認值: true 。)
spring.jms.listener.concurrency
并發(fā)消費者的數(shù)量下限。
spring.jms.listener.max-concurrency
并發(fā)消費者的數(shù)量上限。
spring.jms.pub-sub-domain
如果是主題而非隊列,指明默認的目的地類型是否支持 Pub/Sub。(默認值: false 。)
Jmx
spring.jmx.default-domain
JMX 域名。
spring.jmx.enabled
將管理 Bean 發(fā)布到 JMX 域里。(默認值: true 。)
spring.jmx.server
MBeanServer 的 Bean 名稱。(默認值: mbeanServer 。)
Jpa
spring.jpa.database
要操作的目標數(shù)據(jù)庫,默認自動檢測。也可以通過 databasePlatform 屬性進行設(shè)置。
spring.jpa.database-platform
要操作的目標數(shù)據(jù)庫,默認自動檢測。也可以通過 Database 枚舉來設(shè)置。
spring.jpa.generate-ddl
啟動時要初始化 Schema。(默認值: false 。)
spring.jpa.hibernate.ddl-auto
DDL 模式( none 、 validate 、 update 、 create 和 create-drop )。這是 hibernate. hbm2ddl.auto 屬性的一個快捷方式。在使用嵌入式數(shù)據(jù)庫時,默認為 create-drop , 其他情況下默認為 none 。
spring.jpa.hibernate.naming-strategy
Hibernate 命名策略的全限定類名。
spring.jpa.open-in-view
注冊 OpenEntityManagerInViewInterceptor ,在請求的整個處理過程中,將一個 JPA EntityManager 綁定到線程上。(默認值: true)
spring.jpa.properties
JPA 提供方要設(shè)置的額外原生屬性。
spring.jpa.show-sql
在使用 Bitronix Transaction Manager 時打開 SQL 語句日志。(默認值: false 。)
Jta
spring.jta.allow-multiple-lrc
在使用 Bitronix Transaction Manager 時,事務(wù)管理器是否應(yīng)該允許一個事務(wù)涉及多個 LRC 資源。(默認值: false)
spring.jta.asynchronous2-pc
在使用 Bitronix Transaction Manager 時,是否異步執(zhí)行兩階段提交。(默認值: false 。)
spring.jta.background-recovery-interval
在使用 Bitronix Transaction Manager 時,多久運行一次恢復過程,單位為分鐘。(默認值: 1 )
spring.jta.background-recovery-interval-seconds
在使用 Bitronix Transaction Manager 時,多久運行一次恢復過程,單位為秒。(默認值: 60 )
spring.jta.current-node-only-recovery
在使用 Bitronix Transaction Manager 時,恢復是否要濾除不包含本 JVM 唯一 ID 的 XID。(默認值: true )
spring.jta.debug-zero-resource-transaction
在使用 Bitronix Transaction Manager 時,對于沒有涉及任何資源的事務(wù),是否要跟蹤并記 錄它們的創(chuàng)建和提交調(diào)用棧。(默認值: false)
spring.jta.default-transaction-timeout
在使用 Bitronix Transaction Manager 時,默認的事務(wù)超時時間,單位為秒。(默認值: 60 。)
spring.jta.disable-jmx
在使用 Bitronix Transaction Manager 時,是否要禁止注冊 JMX MBean。(默認值: false 。)
spring.jta.enabled
開啟 JTA 支持。(默認值: true 。)
spring.jta.exception-analyzer
在使用 Bitronix Transaction Manager 時用到的異常分析器。設(shè)置為 null 時使用默認異常分析器,也可以設(shè)置自定義異常分析器的全限定類名。
spring.jta.filter-log-status
在使用 Bitronix Transaction Manager 時,是否只記錄必要的日志。開啟該參數(shù)時能減少分 段(fragment)空間用量,但調(diào)試更復雜了。(默認值: false)
spring.jta.force-batching-enabled
在使用 Bitronix Transaction Manager 時,是否批量輸出至磁盤。禁用批處理會嚴重降低事 務(wù)管理器的吞吐量。(默認值: true 。)
spring.jta.forced-write-enabled
在使用 Bitronix Transaction Manager 時,日志是否強制寫到磁盤上。在生產(chǎn)環(huán)境里不要設(shè) 置為 false ,因為不強制寫到磁盤上無法保證完整性。(默認值: true)
spring.jta.graceful-shutdown-interval
在使用 Bitronix Transaction Manager 時,要關(guān)閉的話,事務(wù)管理器在放棄事務(wù)前最多等它 多少秒。(默認值: 60)
spring.jta.jndi-transaction-synchronization-registry-name
在使用 Bitronix Transaction Manager 時,事務(wù)同步注冊表應(yīng)該綁定到哪個 JNDI 下。(默認 值: java:comp/TransactionSynchronizationRegistry)
spring.jta.jndi-user-transaction-name
在使用 Bitronix Transaction Manager 時,用戶事務(wù)應(yīng)該綁定到哪個 JNDI 下。(默認值: java:comp/UserTransaction 。)
spring.jta.journal
在使用 Bitronix Transaction Manager 時,要用的日志名??梢允?disk 、 null 或者全限定類 名。(默認值: disk 。)
spring.jta.log-dir
事務(wù)日志目錄。
spring.jta.log-part1-filename
日志分段文件 1 的名稱。(默認值: btm1.tlog 。)
spring.jta.log-part2-filename
日志分段文件 2 的名稱。(默認值: btm2.tlog 。)
spring.jta.max-log-size-in-mb
在使用 Bitronix Transaction Manager 時,日志分段文件的最大兆數(shù)。日志越大,事務(wù)就被 允許在未終結(jié)狀態(tài)停留越長時間。但是,如果文件大小限制得太小,事務(wù)管理器在分段 滿了的時候就會暫停更長時間。(默認值: 2 。)
spring.jta.resource-configuration-filename
Bitronix Transaction Manager 的配置文件名。
spring.jta.server-id
唯一標識 Bitronix Transaction Manager 實例的 ID。
spring.jta.skip-corrupted-logs
是否跳過損壞的日志文件。(默認值: false 。)
spring.jta.transaction-manager-id
事務(wù)管理器的唯一標識符。
spring.jta.warn-about-zero-resource-transaction
在使用 Bitronix Transaction Manager 時,是否要對執(zhí)行時沒有涉及任何資源的事務(wù)作出告 警。(默認值: true 。)
Mail
spring.mail.default-encoding
默認的 MimeMessage 編碼。(默認值: UTF-8 。)
spring.mail.host
SMTP 服務(wù)器主機地址。
spring.mail.jndi-name
會話的 JNDI 名稱。設(shè)置之后,該屬性的優(yōu)先級要高于其他郵件設(shè)置。
spring.mail.password
SMTP 服務(wù)器的登錄密碼。
spring.mail.port
SMTP 服務(wù)器的端口號。
spring.mail.properties
附加的 JavaMail 會話屬性。
spring.mail.protocol
SMTP 服務(wù)器用到的協(xié)議。(默認值: smtp 。)
spring.mail.test-connection
在啟動時測試郵件服務(wù)器是否可用。(默認值: false 。)
spring.mail.username
SMTP 服務(wù)器的登錄用戶名。
Messages
spring.messages.basename
逗號分隔的基本名稱列表,都遵循 ResourceBundle 的慣例。本質(zhì)上這就是一個全限定 的 Classpath 位置,如果不包含包限定符(比如 org.mypackage ),就會從 Classpath 的根部開始解析。(默認值: messages 。)
spring.messages.cache-seconds
加載的資源包文件的緩存失效時間,單位為秒。在設(shè)置為 -1 時,包會永遠緩存。(默認值: -1 。)
spring.messages.encoding
消息包的編碼。(默認值: UTF-8 。)
Mobile
spring.mobile.devicedelegatingviewresolver.enable-fallback
開啟降級解析支持。(默認值: false 。)
spring.mobile.devicedelegatingviewresolver.enabled
開啟設(shè)備視圖解析器。(默認值: false 。)
spring.mobile.devicedelegatingviewresolver.mobile-prefix
添加到移動設(shè)備視圖名前的前綴。(默認值: mobile/ 。)
spring.mobile.devicedelegatingviewresolver.mobile-suffix
添加到移動設(shè)備視圖名后的后綴。
spring.mobile.devicedelegatingviewresolver.normal-prefix
添加到普通設(shè)備視圖名前的前綴。
spring.mobile.devicedelegatingviewresolver.normal-suffix
添加到普通設(shè)備視圖名后的后綴。
spring.mobile.devicedelegatingviewresolver.tablet-prefix
添加到平板設(shè)備視圖名前的前綴。(默認值: tablet/ 。)
spring.mobile.devicedelegatingviewresolver.tablet-suffix
添加到平板設(shè)備視圖名后的后綴。
spring.mobile.sitepreference.enabled
開啟 SitePreferenceHandler 。(默認值: true 。)
Mongodb
spring.mongodb.embedded.features
要開啟的特性列表,用逗號分隔。
spring.mongodb.embedded.version
要使用的 Mongo 版本。(默認值: 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
添加到模板名前的前綴。(默認值: classpath:/ templates/ 。)
spring.mustache.suffix
添加到模板名后的后綴。(默認值: .html 。)
spring.mustache.view-names
可解析的視圖名稱的白名單。
Mvc
spring.mvc.async.request-timeout
異步請求處理超時前的等待時間(單位為毫秒)。如果沒有設(shè)置該屬性,則使用底層實現(xiàn) 的默認超時時間,比如,Tomcat 上使用 Servlet 3 時超時時間為 10 秒。
spring.mvc.date-format
要使用的日期格式(比如 dd/MM/yyyy )。
spring.mvc.favicon.enabled
開啟 favicon.ico 的解析。(默認值: true 。)
spring.mvc.ignore-default-model-on-redirect
在重定向的場景下,是否要忽略“默認”模型對象的內(nèi)容。(默認值: 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 視圖后綴。
Mybatis
mybatis.mapper-locations
mybatis 映射文件位置。mybatis.type-aliases-package
別名包位置。
Rabbitmq
spring.rabbitmq.addresses
客戶端應(yīng)該連接的地址列表,用逗號分隔。
spring.rabbitmq.dynamic
創(chuàng)建一個 AmqpAdmin Bean。(默認值: true 。)
spring.rabbitmq.host
RabbitMQ 主機地址。(默認值: localhost 。)
spring.rabbitmq.listener.acknowledge-mode
容器的應(yīng)答模式。
spring.rabbitmq.listener.auto-startup
啟動時自動開啟容器。(默認值: true 。)
spring.rabbitmq.listener.concurrency
消費者的數(shù)量下限。
spring.rabbitmq.listener.max-concurrency
消費者的數(shù)量上限。
spring.rabbitmq.listener.prefetch
單個請求里要處理的消息數(shù)。該數(shù)值不應(yīng)小于事務(wù)數(shù)(如果用到的話)。
spring.rabbitmq.listener.transaction-size
一個事務(wù)里要處理的消息數(shù)。為了保證效果,應(yīng)該不大于預先獲取的數(shù)量。
spring.rabbitmq.password
進行身份驗證的密碼。
spring.rabbitmq.port
RabbitMQ 端口。(默認值: 5672 。)
spring.rabbitmq.requested-heartbeat
請求心跳超時,單位為秒; 0 表示不啟用心跳。
spring.rabbitmq.ssl.enabled
開啟 SSL 支持。(默認值: 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
進行身份驗證的用戶名。
spring.rabbitmq.virtual-host
在連接 RabbitMQ 時的虛擬主機。
Redis
spring.redis.database
連接工廠使用的數(shù)據(jù)庫索引。(默認值: 0 。)
spring.redis.host
Redis 服務(wù)器主機地址。(默認值: localhost 。)
spring.redis.password
Redis 服務(wù)器的登錄密碼。
spring.redis.pool.max-active
連接池在指定時間里能分配的最大連接數(shù)。負數(shù)表示無限制。(默認值: 8 。)
spring.redis.pool.max-idle
連接池里的最大空閑連接數(shù)。負數(shù)表示空閑連接數(shù)可以是無限大。(默認值: 8 。)
spring.redis.pool.max-wait
當連接池被耗盡時,分配連接的請求應(yīng)該在拋出異常前被阻塞多長時間(單位為秒)。負 數(shù)表示一直阻塞。(默認值: -1 。)
spring.redis.pool.min-idle
連接池里要維持的最小空閑連接數(shù)。該屬性只有在設(shè)置為正數(shù)時才有效。(默認值: 0 。)
spring.redis.port
Redis 服務(wù)器端口。(默認值: 6379 。)
spring.redis.sentinel.master
Redis 服務(wù)器的名字。
spring.redis.sentinel.nodes
形如“主機: 端口”配對的列表,用逗號分隔。
spring.redis.timeout
連接超時時間,單位為秒。(默認值: 0 。)
Resources
spring.resources.add-mappings
開啟默認資源處理。(默認值: true 。)
spring.resources.cache-period
資源處理器對資源的緩存周期,單位為秒。
spring.resources.chain.cache
對資源鏈開啟緩存。(默認值: true 。)
spring.resources.chain.enabled
開啟 Spring 資源處理鏈。(默認關(guān)閉的,除非至少開啟了一個策略。)
spring.resources.chain.html-application-cache
開啟 HTML5 應(yīng)用程序緩存證明重寫。(默認值: false 。)
spring.resources.chain.strategy.content.enabled
開啟內(nèi)容版本策略。(默認值: 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
靜態(tài)資源位置。默認為 classpath: [/META-INF/resources/, /resources/, /static/, /public/] 加上 context:/(Servlet 上下文的根目錄)。
SendGrid
spring.sendgrid.password
SendGrid 密碼。
spring.sendgrid.proxy.host
SendGrid 代理主機地址。
spring.sendgrid.proxy.port
SendGrid 代理端口。
spring.sendgrid.username
SendGrid 用戶名。
Social
spring.social.auto-connection-views
針對所支持的提供方開啟連接狀態(tài)視圖。(默認值: 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
開啟模板緩存。(默認值: true 。)
spring.thymeleaf.check-template-location
檢查模板位置是否存在。(默認值: true 。)
spring.thymeleaf.content-type
Content-Type 的值。(默認值: text/html 。)
spring.thymeleaf.enabled
開啟 MVC Thymeleaf 視圖解析。(默認值: true 。)
spring.thymeleaf.encoding
模板編碼。(默認值: UTF-8 。)
spring.thymeleaf.excluded-view-names
要被排除在解析之外的視圖名稱列表,用逗號分隔。
spring.thymeleaf.mode
要運用于模板之上的模板模式。另見 StandardTemplate- ModeHandlers 。(默認值: HTML5 。)
spring.thymeleaf.prefix
在構(gòu)建 URL 時添加到視圖名稱前的前綴。(默認值: classpath:/templates/ 。)
spring.thymeleaf.suffix
在構(gòu)建 URL 時添加到視圖名稱后的后綴。(默認值: .html 。)
spring.thymeleaf.template-resolver-order
Thymeleaf 模板解析器在解析器鏈中的順序。默認情況下,它排在第一位。順序從 1 開始只有在定義了額外的 TemplateResolver Bean 時才需要設(shè)置這個屬性。
spring.thymeleaf.view-names
可解析的視圖名稱列表,用逗號分隔。
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 輔助對象在視圖的 Velocity 上下文里呈現(xiàn)的名字。
spring.velocity.enabled
開啟 Velocity 的 MVC 視圖解析。
spring.velocity.expose-request-attributes
在模型合并到模板前,是否要把所有的請求屬性添加到模型里。
spring.velocity.expose-session-attributes
在模型合并到模板前,是否要把所有的 HttpSession 屬性添加到模型里。
spring.velocity.expose-spring-macro-helpers
是否發(fā)布供 Spring 宏程序庫使用的 RequestContext ,并將其名命為 springMacro- RequestContext 。
spring.velocity.number-tool-attribute
NumberTool 輔助對象在視圖的 Velocity 上下文里呈現(xiàn)的名字。
spring.velocity.prefer-file-system-access
加載模板時優(yōu)先通過文件系統(tǒng)訪問。文件系統(tǒng)訪問能夠?qū)崟r檢測到模板變更。(默認值: true 。)
spring.velocity.prefix
在構(gòu)建 URL 時添加到視圖名稱前的前綴。
spring.velocity.properties
額外的 Velocity 屬性。
spring.velocity.request-context-attribute
所有視圖里使用的 Request- Context 屬性的名稱。
spring.velocity.resource-loader-path
模板路徑。(默認值: classpath:/ templates/ 。)
spring.velocity.suffix
在構(gòu)建 URL 時添加到視圖名稱后的后綴。
spring.velocity.toolbox-config-location
Velocity Toolbox 的配置位置,比如 /WEB-INF/toolbox.xml。自動加載 Velocity Tools 工具定 義文件,將所定義的全部工具發(fā)布到指定的作用域內(nèi)。
spring.velocity.view-names
可解析的視圖名稱白名單。
View
spring.view.prefix
Spring MVC 視圖前綴。
spring.view.suffix
Spring MVC 視圖后綴。
其它
spring.aop.auto
添加 @EnableAspectJAutoProxy(默認:true)
spring.application.admin.enabled
開啟應(yīng)用程序的管理功能 (默認:false)
spring.artemis.embedded.cluster-password
集群密碼。默認在啟東市隨機生成
spring.artemis.embedded.persistent
開啟持久化存儲 (默認:false)
spring.autoconfigure.exclude
要排除的自動配置類
spring boot常用屬性匯總
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
- 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事?!?“怎么了?”我有些...
- 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上,一...
- 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起,我...
- 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背。 一陣腳步聲響...
推薦閱讀更多精彩內(nèi)容
- application的配置屬性。 這些屬性是否生效取決于對應(yīng)的組件是否聲明為Spring應(yīng)用程序上下文里的Bea...
- Spring Boot 參考指南 介紹 轉(zhuǎn)載自:https://www.gitbook.com/book/qbgb...
- Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
- SPRING CONFIG (ConfigFileApplicationListener) spring.conf...
- =========================================================...