天天看點

SpringBoot配置檔案屬性值

flyway.baseline-description

執行基線時标記已有Schema的描述。

flyway.baseline-on-migrate

在沒有中繼資料表的情況下,針對非空Schema執行遷移時是否自動調用基線。(預設值:false。)

flyway.baseline-version

執行基線時用來标記已有Schema的版本。(預設值:1。)

flyway.check-location

檢查遷移腳本所在的位置是否存在。(預設值:false。)

flyway.clean-on-validation-error

在驗證錯誤時,是否自動執行清理。(預設值:false。)

flyway.enabled

開啟Flyway。(預設值:true。)

flyway.encoding

設定SQL遷移檔案的編碼。(預設值:UTF-8。)

flyway.ignore-failed-future-migration

在讀中繼資料表時,是否忽略失敗的後續遷移。(預設值:false。)

flyway.init-sqls

擷取連接配接後立即執行初始化的SQL語句。

flyway.locations

遷移腳本的位置。(預設值:db/migration。)

flyway.out-of-order

是否允許亂序(out of order)遷移。(預設值:false。)

flyway.password

待遷移資料庫的登入密碼。

flyway.placeholder-prefix

設定每個占位符的字首。(預設值:${。)

flyway.placeholder-replacement

是否要替換占位符。(預設值:true。)

flyway.placeholder-suffix

設定占位符的字尾。(預設值:}。)

flyway.placeholders.[placeholder name]

設定占位符的值。

flyway.schemas

Flyway管理的Schema清單,區分大小寫。預設連接配接對應的預設Schema。

flyway.sql-migration-prefix

SQL遷移的檔案名字首。(預設值:V。)

flyway.sql-migration-separator

SQL遷移的檔案名分隔符。(預設值:__。)

flyway.sql-migration-suffix

SQL遷移的檔案名字尾。(預設值:.sql。)

flyway.table

Flyway使用的Schema中繼資料表名稱。(預設值:schema_version。)

flyway.target

Flyway要遷移到的目标版本号。(預設最新版本。)

flyway.url

待遷移的資料庫的JDBC URL。如果沒有設定,就使用配置的主資料源。

flyway.user

待遷移資料庫的登入使用者。

flyway.validate-on-migrate

在運作遷移時是否要自動驗證。(預設值:true。)

liquibase.change-log

變更日志配置路徑。(預設值:classpath:/db/changelog/db.changelog-master.yaml。)

liquibase.check-change-log-location

檢查變更日志位置是否存在。(預設值:true。)

liquibase.contexts

要使用的運作時上下文清單,用逗号分隔。

liquibase.default-schema

預設的資料庫Schema。

liquibase.drop-first

先删除資料庫Schema。(預設值:false。)

liquibase.enabled

開啟Liquibase支援。(預設值:true。)

liquibase.password

待遷移資料庫的登入密碼。

liquibase.url

待遷移資料庫的JDBC URL。如果沒有設定,就使用配置的主資料源。

liquibase.user

待遷移資料庫的登入使用者。

multipart.enabled

開啟分段(multi-part)上傳支援。(預設值:true。)

multipart.file-size-threshold

大于該門檻值的檔案會寫到磁盤上。這裡的值可以使用MB或KB字尾來表明是兆位元組還是千

位元組。(預設值:0。)

multipart.location

上傳檔案的中間存放位置。

multipart.max-file-size

最大檔案大小。這裡的值可以使用MB或KB字尾來表明是兆位元組還是千位元組。(預設值:1MB。)

multipart.max-request-size

最大請求大小。這裡的值可以使用MB或KB字尾來表明是兆位元組還是千位元組。(預設值:10MB。)

security.basic.authorize-mode

要運用的安全授權模式。

security.basic.enabled

開啟基本身份驗證。(預設值:true。)

security.basic.path

要保護的路徑,用逗号分隔。(預設值:[/**]。)

security.basic.realm

HTTP基本領域(realm)使用者名。(預設值:Spring。)

security.enable-csrf

開啟跨站請求僞造(cross-site request forgery)支援。(預設值:false。)

security.filter-order

安全過濾器鍊順序。(預設值:0。)

security.headers.cache

開啟緩存控制HTTP頭。(預設值:false。)

security.headers.content-type

開啟X-Content-Type-Options頭。(預設值:false。)

security.headers.frame

開啟X-Frame-Options頭。(預設值:false。)

security.headers.hsts

HTTP Strict Transport Security(HSTS)模式(可設定為none、domain、all)。

security.headers.xss

開啟跨站腳本(cross-site scripting)保護。(預設值:false。)

security.ignored

要從預設保護路徑中排除掉的路徑清單,用逗号分隔。

security.oauth2.client.access-token-uri

用于擷取通路令牌的URI。

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

在令牌過期前多長時間驗證一次。

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

設定額外的資訊,令牌授予者會将其添加到令牌裡。

security.oauth2.client.authentication-scheme

傳送持有人令牌(bearer token)的方法,包括form、header、none、query,可選其一。(預設值:header。)

security.oauth2.client.authorities

要賦予經授權用戶端的權限。

security.oauth2.client.authorized-grant-types

用戶端可用的授予類型。

security.oauth2.client.auto-approve-scopes

用戶端自動通過的範圍。

security.oauth2.client.client-authentication-scheme

在用戶端身份認證時用于傳輸身份認證資訊的方法,包括form、header、none、query,可選其一。(預設值:header。)

security.oauth2.client.client-id

OAuth2用戶端ID。

security.oauth2.client.client-secret

OAuth2用戶端密鑰。預設随機生成。

security.oauth2.client.grant-type

獲得資源通路令牌的授予類型。

security.oauth2.client.id

應用程式的用戶端ID。

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

與伺服器預先建立好的重定向URI。如果設定了該屬性,使用者授權請求中的重定向URI會被忽略,因為伺服器不需要它。

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

重新整理令牌在過期前的有效時間。

security.oauth2.client.registered-redirect-uri

用戶端裡注冊的重定向URI,用逗号分隔。

security.oauth2.client.resource-ids

與用戶端關聯的資源ID,用逗号分隔。

security.oauth2.client.scope

用戶端配置設定的域。

security.oauth2.client.token-name

令牌名稱。

security.oauth2.client.use-current-uri

請求裡的目前URI(如果設定了的話)是否優先于預建立的重定向URI。(預設值:true。)

security.oauth2.client.user-authorization-uri

使用者要重定向以便授通路令牌的URI。

security.oauth2.resource.id

資源的辨別符。

security.oauth2.resource.jwt.key-uri

JWT令牌的URI。如果沒有配置key-value,使用的又是公鑰,那麼可以對這個屬性進行設定。

security.oauth2.resource.jwt.key-value

JWT令牌的驗證密鑰,可以是對稱密鑰,也可以是PEM編碼的RSA公鑰。如果沒有配置

這個屬性,那麼可以用key-uri代替。

security.oauth2.resource.prefer-token-info

使用令牌的資訊,設定為false則使用使用者資訊。(預設值:true。)

security.oauth2.resource.service-id

服務ID。(預設值:resource。)

security.oauth2.resource.token-info-uri

令牌解碼端點URI。

security.oauth2.resource.token-type

在使用userInfoUri時發送的令牌類型。

security.oauth2.resource.user-info-uri

使用者端點的URI。

security.oauth2.sso.filter-order

在沒有顯式提供WebSecurityConfigurerAdapter時應用的過濾器順序,在Web-

SecurityConfigurerAdapter裡也可以指定順序。

security.oauth2.sso.login-path

登入頁的路徑——登入頁是觸發重定向到OAuth2授權伺服器的頁面。(預設值:/login。)

security.require-ssl

對所有請求開啟安全通道。(預設值:false。)

security.sessions

建立會話使用的政策。(可選值包括:always、never、if_required、stateless。)

security.user.name

預設的使用者名。(預設值:user。)

security.user.password

預設使用者的密碼。

security.user.role

賦予預設使用者的角色。

server.address

伺服器綁定的網絡位址。

server.compression.enabled

是否要開啟壓縮。(預設值:false。)

server.compression.excluded-user-agents

用逗号分割的清單,标明哪些使用者代理不該開啟壓縮。(可選值包括:text/html、

text/xml、text/plain、text/css)

server.compression.mime-types

要開啟壓縮的MIME類型清單,用逗号分割。

server.compression.min-response-size

要執行壓縮的最小響應大小(機關為位元組)。(預設值:2048。)

server.context-parameters.[param name]

設定一個Servlet上下文參數。

server.context-path

應用程式的上下文路徑。

server.display-name

應用程式的顯示名稱。(預設值:application。)

server.jsp-servlet.class-name

針對JSP使用的Servlet類名。(預設值:org.apache.jasper.servlet.JspServlet。)

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

設定JSP Servlet初始化參數。

server.jsp-servlet.registered

JSP Servlet是否要注冊到内嵌的Servlet容器裡。(預設值:true。)

server.port

伺服器的HTTP端口。

server.servlet-path

主分發器Servlet的路徑。(預設值:/。)

server.session.cookie.comment

會話Cookie的注釋。

server.session.cookie.domain

會話Cookie的域。

server.session.cookie.http-only

會話Cookie的HttpOnly标記。

server.session.cookie.max-age

會話Cookie的最大儲存時間,機關為秒。

server.session.cookie.name

會話Cookie名稱。

server.session.cookie.path

會話Cookie的路徑。

server.session.cookie.secure

會話Cookie的Secure标記。

server.session.persistent

是否在兩次重新開機間持久化會話資料。(預設值:false。)

server.session.timeout

會話逾時時間,機關為秒。

server.session.tracking-modes

會話跟蹤模式(包括:cookie、url和ssl,可選其一或若幹)。

server.ssl.ciphers

支援的SSL加密算法。

server.ssl.client-auth

用戶端授權是主動想(want)還是被動需要(need)。要有一個TrustStore。

server.ssl.enabled

是否開啟SSL。(預設值:true。)

server.ssl.key-alias

在KeyStore裡辨別密鑰的别名。

server.ssl.key-password

在KeyStore裡用于通路密鑰的密碼。

server.ssl.key-store

持有SSL證書的KeyStore的路徑(通常指向一個.jks檔案)。

server.ssl.key-store-password

通路KeyStore時使用的密鑰。

server.ssl.key-store-provider

KeyStore的提供者。

server.ssl.key-store-type

KeyStore的類型。

server.ssl.protocol

要使用的SSL協定。(預設值:TLS。)

server.ssl.trust-store

持有SSL證書的TrustStore。

server.ssl.trust-store-password

用于通路TrustStore的密碼。

server.ssl.trust-store-provider

TrustStore的提供者。

server.ssl.trust-store-type

TrustStore的類型。

server.tomcat.access-log-enabled

是否開啟通路日志。(預設值:false。)

server.tomcat.access-log-pattern

通路日志的格式。(預設值:common。)

server.tomcat.accesslog.directory

建立日志檔案的目錄。可以相對于Tomcat基礎目錄,也可以是絕對路徑。(預設值:logs。)

server.tomcat.accesslog.enabled

開啟通路日志。(預設值:false。)

server.tomcat.accesslog.pattern

通路日志的格式。(預設值:common。)

server.tomcat.accesslog.prefix

日志檔案名的字首。(預設值:access_log。)

server.tomcat.accesslog.suffix

日志檔案名的字尾。(預設值:.log。)

server.tomcat.background-processor-delay

兩次調用backgroundProcess方法之間的延遲時間,機關為秒。(預設值:30。)

server.tomcat.basedir

Tomcat的基礎目錄。如果沒有指定則使用一個臨時目錄。

server.tomcat.internal-proxies

比對可信任代理伺服器的正規表達式。預設值:“10\.\d{1,3}\.\d{1,3}\. \d{1,3}|192\.168\.\d

{1,3}\.\d{1,3}| 169\.254\.\d{1,3}\.\d{1,3}| 127\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.1[6-9]{1}\.\d{1,3}

\.\d{1,3}| 172\.2[0-9]{1}\.\d{1,3}\.\d{1,3}|172\.3[0-1]{1}\.\d{1,3}\.\d{1,3}”。

server.tomcat.max-http-header-size

HTTP消息頭的最大位元組數。(預設值:0。)

server.tomcat.max-threads

最大工作線程數。(預設值:0。)

server.tomcat.port-header

用來覆寫原始端口值的HTTP頭的名字。

server.tomcat.protocol-header

持有流入協定的HTTP頭,通常的名字是X-Forwarded-Proto。僅當設定了remoteIp-

Header的時候,它會被配置為RemoteIpValve。

server.tomcat.protocol-header-https-value

協定頭的值,表明流入請求使用了SSL。(預設值:https。)

server.tomcat.remote-ip-header

表明從哪個HTTP頭裡可以提取到遠端IP。僅當設定了remoteIpHeader的時候,它會被

配置為RemoteIpValve。

server.tomcat.uri-encoding

用來解碼URI的字元編碼。

server.undertow.access-log-dir

Undertow的通路日志目錄。(預設值:logs。)

server.undertow.access-log-enabled

是否開啟通路日志。(預設值:false。)

server.undertow.access-log-pattern

通路日志的格式。(預設值:common。)

server.undertow.accesslog.dir

Undertow通路日志目錄。

server.undertow.accesslog.enabled

開啟通路日志。(預設值:false。)

server.undertow.accesslog.pattern

通路日志的格式。(預設值:common。)

server.undertow.buffer-size

每個緩沖的位元組數。

server.undertow.buffers-per-region

每個區(region)的緩沖數。

server.undertow.direct-buffers

在Java堆外配置設定緩沖。

server.undertow.io-threads

要為工作線程建立的I/O線程數。

server.undertow.worker-threads

工作線程數。

spring.activemq.broker-url

ActiveMQ代理的URL。預設自動生成。

spring.activemq.in-memory

标明預設代理URL是否應該在記憶體裡。如果指定了一個顯式的代理則忽略該屬性。(預設

值:true。)

spring.activemq.password

代理的登入密碼。

spring.activemq.pooled

标明是否要建立一個PooledConnectionFactory來代替普通的ConnectionFactory。(預設值:false。)

spring.activemq.user

代理的登入使用者名。

spring.aop.auto

添加@EnableAspectJAutoProxy。(預設值:true。)

spring.aop.proxy-target-class

是否要建立基于子類(即Code Generation Library,CGLIB)的代理來代替基于Java接口

的代理,前者為true,後者為false。(預設值:false。)

spring.application.admin.enabled

開啟應用程式的管理功能。(預設值:false。)

spring.application.admin.jmx-name

應用程式管理MBean的JMX名稱。(預設值:org.springframework.boot:type=

Admin,name=SpringApplication。)

spring.artemis.embedded.cluster-password

叢集密碼。預設在啟動時随機生成。

spring.artemis.embedded.data-directory

Journal檔案目錄。如果關閉了持久化則不需要該屬性。

spring.artemis.embedded.enabled

如果有Artemis伺服器API則開啟嵌入模式。(預設值:true。)

spring.artemis.embedded.persistent

開啟持久化存儲。(預設值:false。)

spring.artemis.embedded.queues

要在啟動時建立的隊列清單,用逗号分隔。(預設值:[]。)

spring.artemis.embedded.server-id

伺服器ID。預設情況下,使用一個自動遞增的計數器。(預設值:0。)

spring.artemis.embedded.topics

在啟動時要建立的主題清單,用逗号分隔。(預設值:[]。)

spring.artemis.host

Artemis代理主機。(預設值:localhost。)

spring.artemis.mode

Artemis部署模式,預設自動檢測。可以顯式地設定為native或embedded。

spring.artemis.port

Artemis代理端口。(預設值:61616。)

spring.autoconfigure.exclude

要排除的自動配置類。

spring.batch.initializer.enabled

如果有必要的話,在啟動時建立需要的批處理表。(預設值:true。)

spring.batch.job.enabled

在啟動時執行上下文裡的所有Spring Batch任務。(預設值:true。)

spring.batch.job.names

啟動時要執行的任務名清單,用逗号分隔。預設在上下文裡找到的所有任務都會執行。

spring.batch.schema

指向初始化資料庫Schema 用的SQL 檔案的路徑。( 預設值: classpath:org/

springframework/batch/core/[email protected]@[email protected]@.sql。)

spring.batch.table-prefix

所有批進行中繼資料表的表字首。

180 附錄C 配置屬性

spring.cache.cache-names

如果底層緩存管理器支援緩存名的話,可以在這裡指定要建立的緩存名清單,用逗号分

隔。通常這會禁用運作時建立其他額外緩存的能力。

spring.cache.ehcache.config

用來初始化EhCache的配置檔案的位置。

spring.cache.guava.spec

用來建立緩存的Spec。要獲得有關Spec格式的詳細情況,可以檢視CacheBuilderSpec。

spring.cache.hazelcast.config

用來初始化Hazelcast的配置檔案的位置。

spring.cache.infinispan.config

用來初始化Infinispan的配置檔案的位置。

spring.cache.jcache.config

用來初始化緩存管理器的配置檔案的位置。配置檔案依賴于底層的緩存實作。

spring.cache.jcache.provider

CachingProvider實作的全限定類名,用來擷取JSR-107相容的緩存管理器,僅在

Classpath裡有不隻一個JSR-107實作時才需要這個屬性。

spring.cache.type

緩存類型,預設根據環境自動檢測。

spring.dao.exceptiontranslation.enabled

打開PersistenceExceptionTranslationPostProcessor。(預設值:true。)

spring.data.elasticsearch.cluster-name

Elasticsearch叢集名。(預設值:elasticsearch)

spring.data.elasticsearch.cluster-nodes

叢集節點位址清單,用逗号分隔。如果沒有指定,就啟動一個用戶端節點。

spring.data.elasticsearch.properties

用來配置用戶端的額外屬性。

spring.data.elasticsearch.repositories.enabled

開啟Elasticsearch倉庫。(預設值:true。)

spring.data.jpa.repositories.enabled

開啟JPA倉庫。(預設值:true。)

spring.data.mongodb.authentication-database

身份認證資料庫名。

spring.data.mongodb.database

資料庫名。

spring.data.mongodb.field-naming-strategy

要使用的FieldNamingStrategy的全限定名。

spring.data.mongodb.grid-fs-database

GridFS資料庫名稱。

spring.data.mongodb.host

Mongo伺服器主機位址。

spring.data.mongodb.password

Mongo伺服器的登入密碼。

spring.data.mongodb.port

Mongo伺服器端口号。

spring.data.mongodb.repositories.enabled

開啟Mongo倉庫。(預設值:true。)

spring.data.mongodb.uri

Mongo資料庫URI。設定了該屬性後就主機和端口号會被忽略。(預設值:mongodb://

localhost/test。)

spring.data.mongodb.username

Mongo伺服器的登入使用者名。

spring.data.rest.base-path

用于釋出倉庫資源的基本路徑。

spring.data.rest.default-page-size

分頁資料的預設頁大小。(預設值:20。)

spring.data.rest.limit-param-name

用于辨別一次傳回多少記錄的URL查詢字元串參數名。(預設值:size。)

spring.data.rest.max-page-size

最大分頁大小。(預設值:1000。)

spring.data.rest.page-param-name

URL查詢字元串參數的名稱,用來辨別傳回哪一頁。(預設值:page。)

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

在建立實體後是否傳回一個響應體。(預設值:false。)

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

在更新實體後是否傳回一個響應體。(預設值:false。)

spring.data.rest.sort-param-name

URL查詢字元串參數的名稱,用來辨別結果排序的方向。(預設值:sort。)

spring.data.solr.host

Solr的主機位址。如果設定了zk-host則忽略該屬性。(預設值:http://127.0.0.1:

8983/solr。)

spring.data.solr.repositories.enabled

開啟Solr倉庫。(預設值:true。)

spring.data.solr.zk-host

ZooKeeper主機位址,格式為“主機:端口”。

spring.datasource.abandon-when-percentage-full

一個百分比形式的門檻值,超過該門檻值則關閉并報告被棄用(逾時)的連接配接。

spring.datasource.allow-pool-suspension

是否允許池暫停(pool suspension)。在開啟池暫停後會有性能會受到一定影響,除非你

真的需要這個功能(例如在備援的系統下),否則不要開啟它。該屬性隻在使用Hikari數

據庫連接配接池時有用。(預設值:false。)

spring.datasource.alternate-username-allowed

是否允許使用其他使用者名。

spring.datasource.auto-commit

更新操作是否自動送出。

spring.datasource.catalog

預設的Catalog名稱。

spring.datasource.commit-on-return

在連接配接歸還時,連接配接池是否要送出挂起的事務。

spring.datasource.connection-init-sql

在所有新連接配接建立時都會執行的SQL語句,該語句會在連接配接加入連接配接池前執行。

spring.datasource.connection-init-sqls

在實體連接配接第一次建立時執行的SQL語句清單。(用于DBCP連接配接池。)

spring.datasource.connection-properties.[key]

設定建立連接配接時使用的屬性。(用于DBCP連接配接池。)

spring.datasource.connection-test-query

用于測試連接配接有效性的SQL查詢。

spring.datasource.connection-timeout

連接配接逾時(機關為毫秒)。

spring.datasource.continue-on-error

初始化資料庫時發生錯誤不要終止。(預設值:false。)

spring.datasource.data

指向資料(資料庫操縱語言,Data Manipulation Language,DML)腳本資源的引用。

spring.datasource.data-source-class-name

用于擷取連接配接的資料源的全限定類名。

spring.datasource.data-source-jndi

用于擷取連接配接的資料源的JNDI位置。

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

設定建立資料源時使用的屬性。(用于Hikari連接配接池。)

spring.datasource.db-properties

設定建立資料源時使用的屬性。(用于Tomcat連接配接池。)

spring.datasource.default-auto-commit

連接配接上的操作是否自動送出。

spring.datasource.default-catalog

連接配接的預設Catalog。

spring.datasource.default-read-only

連接配接的預設隻讀狀态。

spring.datasource.default-transaction-isolation

連接配接的預設事務隔離級别。

spring.datasource.driver-class-name

JDBC驅動的全限定類名。預設根據URL自動檢測。

spring.datasource.fair-queue

是否以FIFO方式傳回連接配接。

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

設定要納入健康檢查的屬性。(用于Hikari連接配接池。)

spring.datasource.idle-timeout

連接配接池中的連接配接能保持閑置狀态的最長時間,機關為毫秒。(預設值:10。)

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

初始化資料庫連接配接池時是否要忽略連接配接。

spring.datasource.init-sql

在連接配接第一次建立時運作的自定義查詢。

spring.datasource.initial-size

在連接配接池啟動時要建立的連接配接數。

spring.datasource.initialization-fail-fast

在連接配接池建立時,如果達不到最小連接配接數是否要抛出異常。(預設值:true。)

spring.datasource.initialize

使用data.sql初始化資料庫。(預設值:true。)

spring.datasource.isolate-internal-queries

是否要隔離内部請求。(預設值:false。)

spring.datasource.jdbc-interceptors

一個分号分隔的類名清單,這些類都擴充了JdbcInterceptor類。這些攔截器會插入

java.sql.Connection對象的操作鍊裡。(用于Tomcat連接配接池。)

spring.datasource.jdbc-url

用來建立連接配接的JDBC URL。

spring.datasource.jmx-enabled

184 附錄C 配置屬性

開啟JMX支援(如果底層連接配接池提供該功能的話)。(預設值:false。)

spring. datasource.jndi-name

資料源的JNDI位置。設定了該屬性則忽略類、URL、使用者名和密碼屬性。

spring.datasource.leak-detection-threshold

用來檢測Hikari連接配接池連接配接洩露的門檻值,機關為毫秒。

spring.datasource.log-abandoned

是否針對棄用語句或連接配接的應用程式代碼記錄下跟蹤棧。用于DBCP連接配接池。(預設值:

false。)

spring.datasource.log-validation-errors

在使用Tomcat連接配接池時是否要記錄驗證錯誤。

spring.datasource.login-timeout

連接配接資料庫的逾時時間(機關為秒)。

spring.datasource.max-active

連接配接池中的最大活躍連接配接數。

spring.datasource.max-age

連接配接池中連接配接的最長壽命。

spring.datasource.max-idle

連接配接池中的最大空閑連接配接數。

spring.datasource.max-lifetime

連接配接池中連接配接的最長壽命(機關為毫秒)。

spring.datasource.max-open-prepared-statements

開啟狀态的PreparedStatement的數量上限。

spring.datasource.max-wait

連接配接池在等待傳回連接配接時,最長等待多少毫秒再抛出異常。

spring.datasource.maximum-pool-size

連接配接池能達到的最大規模,包含空閑連接配接的數量和使用中的連接配接數量。

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

一個空閑連接配接被空閑連接配接釋放器(如果存在的話)優雅地釋放前,最短會在連接配接池裡停

留多少時間。

spring.datasource.min-idle

連接配接池裡始終應該保持的最小連接配接數。(用于DBCP和Tomcat連接配接池。)

spring.datasource.minimum-idle:

HikariCP試圖在連接配接池裡維持的最小空閑連接配接數。

spring.datasource.name

資料源的名稱。

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

空閑對象釋放器線程(如果存在的話)每次運作時要檢查的對象數。

spring.datasource.password

資料庫的登入密碼。

spring.datasource.platform

在Schema資源(schema-${platform}.sql)裡要使用的平台。(預設值:all。)

spring.datasource.pool-name

連接配接池名稱。

spring.datasource.pool-prepared-statements

是否要将Statement放在池裡。

spring.datasource.propagate-interrupt-state

對于等待連接配接的中斷線程,是否要傳播中斷狀态。

spring.datasource.read-only

在使用Hikari連接配接池時将資料源設定為隻讀。

spring.datasource.register-mbeans

Hikari連接配接池是否要注冊JMX MBean。

spring.datasource.remove-abandoned

被棄用的連接配接在到達棄用逾時後是否應該被移除。

spring.datasource.remove-abandoned-timeout

連接配接在多少秒後應該考慮棄用。

spring.datasource.rollback-on-return

在連接配接歸還連接配接池時,是否要復原挂起的事務。

spring.datasource.schema

Schema(資料定義語言,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

186 附錄C 配置屬性

在連接配接空閑時是否要進行測試。

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

在兩次空閑連接配接驗證、棄用連接配接清理和空閑池大小調整之間睡眠的毫秒數。

spring.datasource.transaction-isolation

在使用Hikari連接配接池時設定預設事務隔離級别。

spring.datasource.url

資料庫的JDBC URL。

spring.datasource.use-disposable-connection-facade

連接配接是否要用一個門面(facade)封裝起來,在調用了Connection.close()後就不能

再使用這個連接配接了。

spring.datasource.use-equals

在比較方法名時是否使用String.equals()來代替==。

spring.datasource.use-lock

在操作連接配接對象時是否要加鎖。

spring.datasource.username

資料庫的登入使用者名。

spring.datasource.validation-interval

執行連接配接驗證的間隔時間,機關為毫秒。

spring.datasource.validation-query

在連接配接池裡的連接配接傳回給調用者或連接配接池時,要執行的驗證SQL查詢。

spring.datasource.validation-query-timeout

在連接配接驗證查詢執行失敗前等待的逾時時間,機關為秒。

spring.datasource.validation-timeout

在連接配接驗證失敗前等待的逾時時間,機關為秒。(用于Hikari連接配接池。)

spring.datasource.validator-class-name

可選驗證器類的全限定類名,用于執行測試查詢。

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

XA資料源的全限定類名。

spring.datasource.xa.properties

要傳遞給XA資料源的屬性。

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

是否釋出供Spring宏程式庫使用的RequestContext,并将命其名為springMacro-

RequestContext。

spring.freemarker.prefer-file-system-access

加載模闆時優先通過檔案系統通路。檔案系統通路能夠實時檢測到模闆變更。(預設值:

true。)

spring.freemarker.prefix

在建構URL時添加到視圖名稱前的字首。

spring.freemarker.request-context-attribute

在所有視圖裡使用的RequestContext屬性的名稱。

spring.freemarker.settings

要傳遞給FreeMarker配置的各種鍵。

spring.freemarker.suffix

在建構URL時添加到視圖名稱後的字尾。

spring.freemarker.template-loader-path

模闆路徑清單,用逗号分隔。(預設值:["classpath:/templates/"]。)

spring.freemarker.view-names

可解析的視圖名稱的白名單。

spring.groovy.template.allow-request-override

HttpServletRequest的屬性是否允許覆寫(隐藏)控制器生成的同名模型屬性。

spring.groovy.template.allow-session-override

HttpSession的屬性是否允許覆寫(隐藏)控制器生成的同名模型屬性。

spring.groovy.template.cache

開啟模闆緩存。

188 附錄C 配置屬性

spring.groovy.template.charset

模闆編碼。

spring.groovy.template.check-template-location

檢查模闆位置是否存在。

spring.groovy.template.configuration.auto-escape

模型變量在模闆裡呈現時是否要做轉義。(預設值:false。)

spring.groovy.template.configuration.auto-indent

模闆是否要自動呈現縮進。(預設值:false。)

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

開啟自動縮進時用于縮進的字元串,可以是SPACES,也可以是TAB。(預設值:SPACES。)

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

模闆裡是否要呈現新的空行。(預設值:false。)

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

模闆基類。

spring.groovy.template.configuration.cache-templates

模闆是否應該緩存。(預設值:true。)

spring.groovy.template.configuration.declaration-encoding

用來寫聲明頭的編碼。

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

沒有正文的元素該用短形式(例如,<br/>)還是擴充形式(例如,<br></br>)來書

寫。(預設值:false。)

spring.groovy.template.configuration.locale

設定模闆地域。

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

在自動空行開啟後用來呈現空行的字元串。(預設為系統的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

是否釋出供Spring宏程式庫使用的RequestContext,并将其命名為springMacro-

RequestContext。

spring.groovy.template.prefix

在建構URL時,添加到視圖名稱前的字首。

spring.groovy.template.request-context-attribute

所有視圖裡使用的RequestContext屬性的名稱。

spring.groovy.template.resource-loader-path

模闆路徑(預設值:classpath:/ templates/。)

spring.groovy.template.suffix

在建構URL時,添加到視圖名稱後的字尾。

spring.groovy.template.view-names

可解析的視圖名稱白名單。

spring.h2.console.enabled

開啟控制台。(預設值:false。)

spring.h2.console.path

可以找到控制台的路徑。(預設值:/h2-console。)

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

指定主ObjectMapper是否要應用HATEOAS支援。(預設值:true。)

spring.hornetq.embedded.cluster-password

叢集密碼。預設在啟動時随機生成。

spring.hornetq.embedded.data-directory

日志檔案目錄。如果關閉了持久化功能則不需要該屬性。

spring.hornetq.embedded.enabled

如果有HornetQ伺服器API,則開啟嵌入模式。(預設值:true。)

spring.hornetq.embedded.persistent

開啟持久化存儲。(預設值:false。)

spring.hornetq.embedded.queues

啟動時要建立的隊列清單,用逗号分隔。(預設值:[]。)

spring.hornetq.embedded.server-id

伺服器ID。預設使用自增長計數器。(預設值:0。)

spring.hornetq.embedded.topics

啟動時要建立的主題清單,用逗号分隔。(預設值:[]。)

spring.hornetq.host

HornetQ的主機。(預設值:localhost。)

190 附錄C 配置屬性

spring.hornetq.mode

HornetQ的部署模式,預設為自動檢測。可以顯式地設定為native或embedded。

spring.hornetq.port

HornetQ的端口。(預設值:5445。)

spring.http.converters.preferred-json-mapper

HTTP消息轉換時優先使用JSON映射器。

spring.http.encoding.charset

HTTP請求和響應的字元集。如果沒有顯式地指定Content-Type頭,則将該屬性值作為

這個頭的值。(預設值:UTF-8。)

spring.http.encoding.enabled

開啟HTTP編碼支援。(預設值:true。)

spring.http.encoding.force

強制将HTTP請求和響應編碼為所配置的字元集。(預設值:true。)

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.locale

用于格式化的地域值。

spring.jackson.mapper

Jackson的通用on/off特性。

spring.jackson.parser

用于解析器的Jackson on/off特性。

spring.jackson.property-naming-strategy

Jackson的PropertyNamingStrategy中的一個常量(CAMEL_CASE_TO_LOWER_CASE_

WITH_UNDERSCORES)。也可以設定PropertyNamingStrategy的子類的全限定類名。

spring.jackson.serialization

影響Java對象序列化的Jackson on/off特性。

spring.jackson.serialization-inclusion

控制序列化時要包含哪些屬性。可選擇Jackson的JsonInclude.Include枚舉裡的某個

值。

spring.jackson.time-zone

格式化日期時使用的時區。可以配置各種可識别的時區辨別符,比如America/Los_

Angeles或者GMT+10。

spring.jersey.filter.order

Jersey過濾器鍊的順序。(預設值:0。)

spring.jersey.init

通過Servlet或過濾器傳遞給Jersey的初始化參數。

spring.jersey.type

Jersey內建類型。可以是servlet或者filter。

spring.jms.jndi-name

連接配接工廠的JNDI名字。設定了該屬性,則優先于其他自動配置的連接配接工廠。

spring.jms.listener.acknowledge-mode

容器的應答模式(acknowledgment mode)。預設情況下,監聽器使用自動應答。

spring.jms.listener.auto-startup

啟動時自動啟動容器。(預設值:true。)

spring.jms.listener.concurrency

并發消費者的數量下限。

spring.jms.listener.max-concurrency

并發消費者的數量上限。

spring.jms.pub-sub-domain

如果是主題而非隊列,指明預設的目的地類型是否支援Pub/Sub。(預設值:false。)

spring.jmx.default-domain

JMX域名。

spring.jmx.enabled

将管理Bean釋出到JMX域裡。(預設值:true。)

spring.jmx.server

MBeanServer的Bean名稱。(預設值:mbeanServer。)

spring.jooq.sql-dialect

在與配置的資料源通信時,JOOQ使用的SQLDialect,比如POSTGRES。

spring.jpa.database

要操作的目标資料庫,預設自動檢測。也可以通過databasePlatform屬性進行設定。

spring.jpa.database-platform

要操作的目标資料庫,預設自動檢測。也可以通過Database枚舉來設定。

spring.jpa.generate-ddl

啟動時要初始化Schema。(預設值:false。)

spring.jpa.hibernate.ddl-auto

192 附錄C 配置屬性

DDL模式(none、validate、update、create和create-drop)。這是hibernate.

hbm2ddl.auto屬性的一個快捷方式。在使用嵌入式資料庫時,預設為create-drop;

其他情況下預設為none。

spring.jpa.hibernate.naming-strategy

Hibernate命名政策的全限定類名。

spring.jpa.open-in-view

注冊OpenEntityManagerInViewInterceptor,在請求的整個處理過程中,将一個JPA

EntityManager綁定到線程上。(預設值:true。)

spring.jpa.properties

JPA提供方要設定的額外原生屬性。

spring.jpa.show-sql

在使用Bitronix Transaction Manager時打開SQL語句日志。(預設值:false。)

spring.jta.allow-multiple-lrc

在使用Bitronix Transaction Manager時,事務管理器是否應該允許一個事務涉及多個LRC

資源。(預設值:false。)

spring.jta.asynchronous2-pc

在使用Bitronix Transaction Manager時,是否異步執行兩階段送出。(預設值: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時,對于沒有涉及任何資源的事務,是否要跟蹤并記

錄它們的建立和送出調用棧。(預設值:false。)

spring.jta.default-transaction-timeout

在使用Bitronix Transaction Manager時,預設的事務逾時時間,機關為秒。(預設值:60。)

spring.jta.disable-jmx

在使用Bitronix Transaction Manager時,是否要禁止注冊JMX MBean。(預設值:false。)

spring.jta.enabled

開啟JTA支援。(預設值:true。)

spring.jta.exception-analyzer

在使用Bitronix Transaction Manager時用到的異常分析器。設定為null時使用預設異常分析器,也可以設定自定義異常分析器的全限定類名。

spring.jta.filter-log-status

在使用Bitronix Transaction Manager時,是否隻記錄必要的日志。開啟該參數時能減少分

段(fragment)空間用量,但調試更複雜了。(預設值:false。)

spring.jta.force-batching-enabled

在使用Bitronix Transaction Manager時,是否批量輸出至磁盤。禁用批處理會嚴重降低事

務管理器的吞吐量。(預設值:true。)

spring.jta.forced-write-enabled

在使用Bitronix Transaction Manager時,日志是否強制寫到磁盤上。在生産環境裡不要設

置為false,因為不強制寫到磁盤上無法保證完整性。(預設值:true。)

spring.jta.graceful-shutdown-interval

在使用Bitronix Transaction Manager時,要關閉的話,事務管理器在放棄事務前最多等它

多少秒。(預設值:60。)

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

在使用Bitronix Transaction Manager時,事務同步系統資料庫應該綁定到哪個JNDI下。(預設

值:java:comp/TransactionSynchronizationRegistry。)

spring.jta.jndi-user-transaction-name

在使用Bitronix Transaction Manager時,使用者事務應該綁定到哪個JNDI下。(預設值:

java:comp/UserTransaction。)

spring.jta.journal

在使用Bitronix Transaction Manager時,要用的日志名。可以是disk、null或者全限定類

名。(預設值:disk。)

spring.jta.log-dir

事務日志目錄。

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時,日志分段檔案的最大兆數。日志越大,事務就被

允許在未終結狀态停留越長時間。但是,如果檔案大小限制得太小,事務管理器在分段

滿了的時候就會暫停更長時間。(預設值: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

事務管理器的唯一辨別符。

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

在使用Bitronix Transaction Manager時,是否要對執行時沒有涉及任何資源的事務作出告警。(預設值:true。)

spring.mail.default-encoding

預設的MimeMessage編碼。(預設值:UTF-8。)

spring.mail.host

SMTP伺服器主機位址。

spring.mail.jndi-name

會話的JNDI名稱。設定之後,該屬性的優先級要高于其他郵件設定。

spring.mail.password

SMTP伺服器的登入密碼。

spring.mail.port

SMTP伺服器的端口号。

spring.mail.properties

附加的JavaMail會話屬性。

spring.mail.protocol

SMTP伺服器用到的協定。(預設值:smtp。)

spring.mail.test-connection

在啟動時測試郵件伺服器是否可用。(預設值:false。)

spring.mail.username

SMTP伺服器的登入使用者名。

spring.messages.basename

逗号分隔的基本名稱清單,都遵循ResourceBundle的慣例。本質上這就是一個全限定

的Classpath位置,如果不包含包限定符(比如org.mypackage),就會從Classpath的根部

開始解析。(預設值:messages。)

spring.messages.cache-seconds

加載的資源封包件的緩存失效時間,機關為秒。在設定為-1時,包會永遠緩存。(預設值:-1。)

spring.messages.encoding

消息包的編碼。(預設值:UTF-8。)

spring.mobile.devicedelegatingviewresolver.enable-fallback

開啟降級解析支援。(預設值:false。)

spring.mobile.devicedelegatingviewresolver.enabled

開啟裝置視圖解析器。(預設值:false。)

spring.mobile.devicedelegatingviewresolver.mobile-prefix

添加到移動裝置視圖名前的字首。(預設值:mobile/。)

spring.mobile.devicedelegatingviewresolver.mobile-suffix

添加到移動裝置視圖名後的字尾。

spring.mobile.devicedelegatingviewresolver.normal-prefix

添加到普通裝置視圖名前的字首。

spring.mobile.devicedelegatingviewresolver.normal-suffix

添加到普通裝置視圖名後的字尾。

spring.mobile.devicedelegatingviewresolver.tablet-prefix

添加到平闆裝置視圖名前的字首。(預設值:tablet/。)

spring.mobile.devicedelegatingviewresolver.tablet-suffix

添加到平闆裝置視圖名後的字尾。

spring.mobile.sitepreference.enabled

開啟SitePreferenceHandler。(預設值:true。)

spring.mongodb.embedded.features

要開啟的特性清單,用逗号分隔。

spring.mongodb.embedded.version

要使用的Mongo版本。(預設值:2.6.10。)

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

可解析的視圖名稱的白名單。

spring.mvc.async.request-timeout

異步請求處理逾時前的等待時間(機關為毫秒)。如果沒有設定該屬性,則使用底層實作

的預設逾時時間,比如,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

在重定向的場景下,是否要忽略“預設”模型對象的内容。(預設值: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視圖字尾。

spring.rabbitmq.addresses

用戶端應該連接配接的位址清單,用逗号分隔。

spring.rabbitmq.dynamic

建立一個AmqpAdmin Bean。(預設值:true。)

spring.rabbitmq.host

RabbitMQ主機位址。(預設值:localhost。)

spring.rabbitmq.listener.acknowledge-mode

容器的應答模式。

spring.rabbitmq.listener.auto-startup

啟動時自動開啟容器。(預設值:true。)

spring.rabbitmq.listener.concurrency

消費者的數量下限。

spring.rabbitmq.listener.max-concurrency

消費者的數量上限。

spring.rabbitmq.listener.prefetch

單個請求裡要處理的消息數。該數值不應小于事務數(如果用到的話)。

spring.rabbitmq.listener.transaction-size

一個事務裡要處理的消息數。為了保證效果,應該不大于預先擷取的數量。

spring.rabbitmq.password

進行身份驗證的密碼。

spring.rabbitmq.port

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時的虛拟主機。

spring.redis.database

連接配接工廠使用的資料庫索引。(預設值:0。)

spring.redis.host

Redis伺服器主機位址。(預設值:localhost。)

spring.redis.password

Redis伺服器的登入密碼。

spring.redis.pool.max-active

連接配接池在指定時間裡能配置設定的最大連接配接數。負數表示無限制。(預設值:8。)

spring.redis.pool.max-idle

連接配接池裡的最大空閑連接配接數。負數表示空閑連接配接數可以是無限大。(預設值:8。)

spring.redis.pool.max-wait

當連接配接池被耗盡時,配置設定連接配接的請求應該在抛出異常前被阻塞多長時間(機關為秒)。負

數表示一直阻塞。(預設值:-1。)

spring.redis.pool.min-idle

連接配接池裡要維持的最小空閑連接配接數。該屬性隻有在設定為正數時才有效。(預設值:0。)

spring.redis.port

Redis伺服器端口。(預設值:6379。)

spring.redis.sentinel.master

Redis伺服器的名字。

spring.redis.sentinel.nodes

形如“主機:端口”配對的清單,用逗号分隔。

spring.redis.timeout

連接配接逾時時間,機關為秒。(預設值:0。)

spring.resources.add-mappings

開啟預設資源處理。(預設值:true。)

spring.resources.cache-period

資源處理器對資源的緩存周期,機關為秒。

spring.resources.chain.cache

對資源鍊開啟緩存。(預設值:true。)

spring.resources.chain.enabled

開啟Spring資源處理鍊。(預設關閉的,除非至少開啟了一個政策。)

spring.resources.chain.html-application-cache

開啟HTML5應用程式緩存證明重寫。(預設值:false。)

spring.resources.chain.strategy.content.enabled

開啟内容版本政策。(預設值:false。)

spring.resources.chain.strategy.content.paths

要運用于版本政策的模式清單,用逗号分隔。(預設值:[/**]。)

spring.resources.chain.strategy.fixed.enabled

開啟固定版本政策。(預設值:false。)

spring.resources.chain.strategy.fixed.paths

要運用于固定版本政策的模式清單,用逗号分隔。

spring.resources.chain.strategy.fixed.version

用于固定版本政策的版本字元串。

spring.resources.static-locations

靜态資源位置。預設為classpath: [/META-INF/resources/, /resources/, /static/,

/public/]加上context:/(Servlet上下文的根目錄)。

spring.sendgrid.password

SendGrid密碼。

spring.sendgrid.proxy.host

SendGrid代理主機位址。

spring.sendgrid.proxy.port

SendGrid代理端口。

spring.sendgrid.username

SendGrid使用者名。

spring.social.auto-connection-views

針對所支援的提供方開啟連接配接狀态視圖。(預設值:false。)

spring.social.facebook.app-id

應用程式ID。

spring.social.facebook.app-secret

應用程式的密鑰。

spring.social.linkedin.app-id

應用程式ID。

spring.social.linkedin.app-secret

應用程式的密鑰。

spring.social.twitter.app-id

應用程式ID。

spring.social.twitter.app-secret

應用程式的密鑰。

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

在建構URL時添加到視圖名稱前的字首。(預設值:classpath:/templates/。)

spring.thymeleaf.suffix

在建構URL時添加到視圖名稱後的字尾。(預設值:.html。)

spring.thymeleaf.template-resolver-order

Thymeleaf模闆解析器在解析器鍊中的順序。預設情況下,它排在第一位。順序從1開始,

隻有在定義了額外的TemplateResolver Bean時才需要設定這個屬性。

spring.thymeleaf.view-names

可解析的視圖名稱清單,用逗号分隔。

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上下文裡呈現的名字。

spring.velocity.enabled

開啟Velocity的MVC視圖解析。

spring.velocity.expose-request-attributes

在模型合并到模闆前,是否要把所有的請求屬性添加到模型裡。

spring.velocity.expose-session-attributes

在模型合并到模闆前,是否要把所有的HttpSession屬性添加到模型裡。

spring.velocity.expose-spring-macro-helpers

是否釋出供Spring宏程式庫使用的RequestContext,并将其名命為springMacro-

RequestContext。

spring.velocity.number-tool-attribute

NumberTool輔助對象在視圖的Velocity上下文裡呈現的名字。

spring.velocity.prefer-file-system-access

加載模闆時優先通過檔案系統通路。檔案系統通路能夠實時檢測到模闆變更。(預設值:true。)

spring.velocity.prefix

在建構URL時添加到視圖名稱前的字首。

spring.velocity.properties

額外的Velocity屬性。

spring.velocity.request-context-attribute

附錄C 配置屬性 201

所有視圖裡使用的Request- Context屬性的名稱。

spring.velocity.resource-loader-path

模闆路徑。(預設值:classpath:/ templates/。)

spring.velocity.suffix

在建構URL時添加到視圖名稱後的字尾。

spring.velocity.toolbox-config-location

Velocity Toolbox的配置位置,比如/WEB-INF/toolbox.xml。自動加載Velocity Tools工具定

義檔案,将所定義的全部工具釋出到指定的作用域内。

spring.velocity.view-names

可解析的視圖名稱白名單。

spring.view.prefix

Spring MVC視圖字首。

spring.view.suffix

Spring MVC視圖字尾。

轉載于:https://www.cnblogs.com/watson-xm/p/7922026.html