SpringBoot - application.properties 配置大全
SpringBoot項目最重要也是最核心的配置文件就是application.properties,所有的框架配置都需要在這個配置文件中說明,以下配置不會的可以進行查閱并修改
#SPRING CONFIG(ConfigFileApplicationListener)
spring.config.name =#配置文件名(默認 為 'application' )
spring.config.location =#配置文件的位置 # 多環境配置文件激活屬性
spring.profiles.active=dev #加載application-dev.properties配置文件內容
application-dev.properties: #開發環境
application-test.properties: #測試環境
application-prod.properties: #生產環境#activemq
spring.activemq.broker-url #指定ActiveMQ broker的URL,默認自動生成.
spring.activemq.in-memory #是否是內存模式,默認為true.
spring.activemq.password #指定broker的密碼.
spring.activemq.pooled #是否創建PooledConnectionFactory,而非ConnectionFactory,默認false
spring.activemq.user #指定broker的用戶.#aop
spring.aop.auto #是否支持@EnableAspectJAutoProxy,默認為: true
spring.aop.proxy-target-class #true為使用CGLIB代理,false為JDK代理,默認為false#application
spring.application.admin.enabled #是否啟用admin特性,默認為: false
spring.application.admin.jmx-name #指定admin MBean的名稱,默認為: org.springframework.boot:type=Admin,name=SpringApplication#artemis(HornetQ捐獻給apache后的版本)
spring.artemis.embedded.cluster-password #指定集群的密碼,默認是啟動時隨機生成.
spring.artemis.embedded.data-directory #指定Journal文件的目錄.如果不開始持久化則不必要指定.
spring.artemis.embedded.enabled #是否開啟內嵌模式,默認true
spring.artemis.embedded.persistent #是否開啟persistent store,默認false.
spring.artemis.embedded.queues #指定啟動時創建的隊列,多個用逗號分隔,默認: []
spring.artemis.embedded.server-id #指定Server ID. 默認是一個自增的數字,從0開始.
spring.artemis.embedded.topics #指定啟動時創建的topic,多個的話逗號分隔,默認: []
spring.artemis.host #指定Artemis broker 的host. 默認: localhost
spring.artemis.mode #指定Artemis 的部署模式, 默認為auto-detected(也可以為native or embedded).
spring.artemis.port #指定Artemis broker 的端口,默認為: 61616#autoconfig
spring.autoconfigure.exclude #配置要排除的Auto-configuration classes.#batch
spring.batch.initializer.enabled #是否在必要時創建batch表,默認為true
spring.batch.job.enabled #是否在啟動時開啟batch job,默認為true
spring.batch.job.names #指定啟動時要執行的job的名稱,逗號分隔,默認所有job都會被執行
spring.batch.schema #指定要初始化的sql語句路徑,默認:classpath:org/springframework/batch/core/schema-@@platform@@.sql)
spring.batch.table-prefix #指定批量處理的表的前綴.#cookie、session配置
server.session.cookie.comment #指定session cookie的comment
server.session.cookie.domain #指定session cookie的domain
server.session.cookie.http-only #是否開啟HttpOnly.
server.session.cookie.max-age #設定session cookie的最大age.
server.session.cookie.name #設定Session cookie 的名稱.
server.session.cookie.path #設定session cookie的路徑.
server.session.cookie.secure #設定session cookie的“Secure” flag.
server.session.persistent #重啟時是否持久化session,默認false
server.session.timeout #session的超時時間
server.session.tracking-modes #設定Session的追蹤模式(cookie, url, ssl).#datasource
spring.dao.exceptiontranslation.enabled #是否開啟PersistenceExceptionTranslationPostProcessor,默認為true
spring.datasource.abandon-when-percentage-full #設定超時被廢棄的連接占到多少比例時要被關閉或上報
spring.datasource.allow-pool-suspension #使用Hikari pool時,是否允許連接池暫停,默認為: false
spring.datasource.alternate-username-allowed #是否允許替代的用戶名.
spring.datasource.auto-commit #指定updates是否自動提交.
spring.datasource.catalog #指定默認的catalog.
spring.datasource.commit-on-return #設置當連接被歸還時,是否要提交所有還未完成的事務
spring.datasource.connection-init-sql #指定連接被創建,再被添加到連接池之前執行的sql.
spring.datasource.connection-init-sqls #使用DBCP connection pool時,指定初始化時要執行的sql
spring.datasource.connection-properties.[key] #在使用DBCP connection pool時指定要配置的屬性
spring.datasource.connection-test-query #指定校驗連接合法性執行的sql語句
spring.datasource.connection-timeout #指定連接的超時時間,毫秒單位.
spring.datasource.continue-on-error #在初始化數據庫時,遇到錯誤是否繼續,默認false
spring.datasource.data #指定Data (DML)腳本
spring.datasource.data-source-class-name #指定數據源的全限定名.
spring.datasource.data-source-jndi #指定jndi的地址
spring.datasource.data-source-properties.[key] #使用Hikari connection pool時,指定要設置的屬性
spring.datasource.db-properties #使用Tomcat connection pool,指定要設置的屬性
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 #指定driver的類名,默認從jdbc url中自動探測.
spring.datasource.fair-queue #是否采用FIFO返回連接.
spring.datasource.health-check-properties.[key] #使用Hikari connection pool時,在心跳檢查時傳遞的屬性
spring.datasource.idle-timeout #指定連接多久沒被使用時,被設置為空閑,默認為10ms
spring.datasource.ignore-exception-on-pre-load #當初始化連接池時,是否忽略異常.
spring.datasource.init-sql #當連接創建時,執行的sql
spring.datasource.initial-size #指定啟動連接池時,初始建立的連接數量
spring.datasource.initialization-fail-fast #當創建連接池時,沒法創建指定最小連接數量是否拋異常
spring.datasource.initialize #指定初始化數據源,是否用data.sql來初始化,默認: true
spring.datasource.isolate-internal-queries #指定內部查詢是否要被隔離,默認為false
spring.datasource.jdbc-interceptors #使用Tomcat connection pool時,指定jdbc攔截器,分號分隔
spring.datasource.jdbc-url #指定JDBC URL.
spring.datasource.jmx-enabled #是否開啟JMX,默認為: false
spring.datasource.jndi-name #指定jndi的名稱.
spring.datasource.leak-detection-threshold #使用Hikari connection pool時,多少毫秒檢測一次連接泄露.
spring.datasource.log-abandoned #使用DBCP connection pool,是否追蹤廢棄statement或連接,默認為: false
spring.datasource.log-validation-errors #當使用Tomcat connection pool是否打印校驗錯誤.
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 #指定最大的打開的prepared statements數量.
spring.datasource.max-wait #指定連接池等待連接返回的最大等待時間,毫秒單位.
spring.datasource.maximum-pool-size #指定連接池最大的連接數,包括使用中的和空閑的連接.
spring.datasource.min-evictable-idle-time-millis #指定一個空閑連接最少空閑多久后可被清除.
spring.datasource.min-idle #指定必須保持連接的最小值(For DBCP and Tomcat connection pools)
spring.datasource.minimum-idle #指定連接維護的最小空閑連接數,當使用HikariCP時指定.
spring.datasource.name #指定數據源名.
spring.datasource.num-tests-per-eviction-run #指定運行每個idle object evictor線程時的對象數量
spring.datasource.password #指定數據庫密碼.
spring.datasource.platform #指定schema要使用的Platform(schema-${platform}.sql),默認為: all
spring.datasource.pool-name #指定連接池名字.
spring.datasource.pool-prepared-statements #指定是否池化statements.
spring.datasource.propagate-interrupt-state #在等待連接時,如果線程被中斷,是否傳播中斷狀態.
spring.datasource.read-only #當使用Hikari connection pool時,是否標記數據源只讀
spring.datasource.register-mbeans #指定Hikari connection pool是否注冊JMX MBeans.
spring.datasource.remove-abandoned #指定當連接超過廢棄超時時間時,是否立刻刪除該連接.
spring.datasource.remove-abandoned-timeout #指定連接應該被廢棄的時間.
spring.datasource.rollback-on-return #在歸還連接時,是否回滾等待中的事務.
spring.datasource.schema #指定Schema (DDL)腳本.
spring.datasource.separator #指定初始化腳本的語句分隔符,默認: ;
spring.datasource.sql-script-encoding #指定SQL scripts編碼.
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 #指定空閑連接檢查、廢棄連接清理、空閑連接池大小調整之間的操作時間間隔
spring.datasource.transaction-isolation #指定事務隔離級別,使用Hikari connection pool時指定
spring.datasource.url #指定JDBC URL.
spring.datasource.use-disposable-connection-facade #是否對連接進行包裝,防止連接關閉之后被使用.
spring.datasource.use-equals #比較方法名時是否使用String.equals()替換==.
spring.datasource.use-lock #是否對連接操作加鎖
spring.datasource.username #指定數據庫名.
spring.datasource.validation-interval #指定多少ms執行一次連接校驗.
spring.datasource.validation-query #指定獲取連接時連接校驗的sql查詢語句.
spring.datasource.validation-query-timeout #指定連接校驗查詢的超時時間.
spring.datasource.validation-timeout #設定連接校驗的超時時間,當使用Hikari connection pool時指定
spring.datasource.validator-class-name #用來測試查詢的validator全限定名.
spring.datasource.xa.data-source-class-name #指定數據源的全限定名.
spring.datasource.xa.properties #指定傳遞給XA data source的屬性
#data springdata
spring.data.elasticsearch.cluster-name #指定es集群名稱,默認: elasticsearch
spring.data.elasticsearch.cluster-nodes #指定es的集群,逗號分隔,不指定的話,則啟動client node.
spring.data.elasticsearch.properties #指定要配置的es屬性.
spring.data.elasticsearch.repositories.enabled #是否開啟es存儲,默認為: true
spring.data.jpa.repositories.enabled #是否開啟JPA支持,默認為: true
spring.data.mongodb.authentication-database #指定鑒權的數據庫名
spring.data.mongodb.database #指定mongodb數據庫名
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 #是否開啟mongodb存儲,默認為true
spring.data.mongodb.uri #指定Mongo database URI.默認:mongodb://localhost/test
spring.data.mongodb.username #指定登陸mongodb的用戶名.
spring.data.rest.base-path #指定暴露資源的基準路徑.
spring.data.rest.default-page-size #指定每頁的大小,默認為: 20
spring.data.rest.limit-param-name #指定limit的參數名,默認為: size
spring.data.rest.max-page-size #指定最大的頁數,默認為1000
spring.data.rest.page-param-name #指定分頁的參數名,默認為: page
spring.data.rest.return-body-on-create #當創建完實體之后,是否返回body,默認為false
spring.data.rest.return-body-on-update #在更新完實體后,是否返回body,默認為false
spring.data.rest.sort-param-name #指定排序使用的key,默認為: sort
spring.data.solr.host #指定Solr host,如果有指定了zk的host的話,則忽略。默認為: http://127.0.0.1:8983/solr
spring.data.solr.repositories.enabled #是否開啟Solr repositories,默認為: true
spring.data.solr.zk-host #指定zk的地址,格式為HOST:PORT.
#----------------------------------------
#DEVTOOLS屬性
#---------------------------------------- #DEVTOOLS(DevToolsProperties)
spring.devtools.livereload.enabled = true #啟用livereload.com兼容的server。
spring.devtools.livereload.port = 35729 #服務器端口。
spring.devtools.restart.additional-exclude = #應該從觸發完全重新啟動時排除的其他模式。
spring.devtools.restart.additional-paths = #額外的路徑來觀察變化。
spring.devtools.restart.enabled = true #啟用自動重啟。
spring.devtools.restart.exclude = META-INF /行家/ **,META-INF /資源/ **,資源/ **,靜態/ **,公共/ **,模板/ **,** / * Test.class,** / * Tests.class,git.properties#應該排除觸發完全重啟的模式。
spring.devtools.restart.poll-interval = 1000 #polling 路徑更改之間等待的時間(以毫秒為單位)。
spring.devtools.restart.quiet-period = 400 #觸發重新啟動之前,沒有任何類路徑變化所需的靜默時間(以毫秒為單位)。
spring.devtools.restart.trigger-file = #特定文件的名稱,在更改時會觸發重新啟動檢查。如果未指定任何類路徑文件更改將觸發重新啟動。 #DEVTOOLS REMOTE DEVTOOLS(RemoteDevToolsProperties)
spring.devtools.remote.context-path = #用于處理遠程連接的上下文路徑。
spring.devtools.remote.debug.enabled = true #啟用遠程調試支持。
spring.devtools.remote.debug.local-port = 8000 #本地遠程調試服務器端口。
spring.devtools.remote.proxy.host = #用于連接遠程應用程序的代理主機。
spring.devtools.remote.proxy.port = #用于連接遠程應用程序的代理端口。
spring.devtools.remote.restart.enabled = true #啟用遠程重啟。
spring.devtools.remote.secret = #建立連接所需的共享密鑰(需要啟用遠程支持)。
spring.devtools.remote.secret-header-name = X-AUTH-TOKEN #用于傳輸共享密鑰的HTTP頭。 #----------------------------------------
#執行器屬性
#---------------------------------------- #ENDPOINTS(AbstractEndpoint子類)
endpoints.enabled = true #啟用端點。
endpoints.sensitive = #默認的端點敏感設置。
endpoints.actuator.enabled = true #啟用端點。
endpoints.actuator.path = #端點URL路徑。
endpoints.actuator.sensitive = false #在端點上啟用安全性。
endpoints.autoconfig.enabled = #啟用端點。
endpoints.autoconfig.id = #端點標識符。
endpoints.autoconfig.sensitive = #標記端點是否暴露敏感信息。
endpoints.beans.enabled = #啟用端點。
endpoints.beans.id = #端點標識符。
endpoints.beans.sensitive = #標記端點是否暴露敏感信息。
endpoints.configprops.enabled = #啟用端點。
endpoints.configprops.id = #端點標識符。
endpoints.configprops.keys-to-sanitize #應該清理的密鑰。鍵可以是屬性以或正則表達式結束的簡單字符串。
endpoints.configprops.sensitive = #標記端點是否公開敏感信息。
endpoints.docs.curies.enabled = false #啟用居里代。
endpoints.docs.enabled = true #啟用執行器文檔終結點。
endpoints.docs.path = / docs #
endpoints.docs.sensitive = false # #終端CORS配置(EndpointCorsProperties)
endpoints.cors.allow-credentials = #設置是否支持憑據。未設置時,不支持憑證。
endpoints.cors.allowed-headers = #在請求中允許使用逗號分隔的標題列表。'*'允許所有標題。
endpoints.cors.allowed-methods = GET #逗號分隔的允許的方法列表。'*'允許所有的方法。
endpoints.cors.allowed-origins = #逗號分隔的起源列表允許。'*'允許所有的來源。未設置時,CORS支持被禁用。
endpoints.cors.exposed-headers = #包含在響應中的逗號分隔的標題列表。
endpoints.cors.max-age = 1800 #以秒為單位,客戶端可以緩存飛行前請求的響應。 #JMX ENDPOINT(EndpointMBeanExportProperties)
endpoints.jmx.domain = #JMX域名。如果設置,則用“spring.jmx.default-domain”的值初始化。
endpoints.jmx.enabled = true #啟用所有端點的JMX導出。
endpoints.jmx.static-names = #附加到所有表示端點的MBean的ObjectName的靜態屬性。
endpoints.jmx.unique-names = false #確保ObjectNames在發生沖突時被修改。 #flyway
flyway.baseline-description #對執行遷移時基準版本的描述.
flyway.baseline-on-migrate #當遷移時發現目標schema非空,而且帶有沒有元數據的表時,是否自動執行基準遷移,默認false.
flyway.baseline-version #開始執行基準遷移時對現有的schema的版本打標簽,默認值為1.
flyway.check-location #檢查遷移腳本的位置是否存在,默認false.
flyway.clean-on-validation-error #當發現校驗錯誤時是否自動調用clean,默認false.
flyway.enabled #是否開啟flywary,默認true.
flyway.encoding #設置遷移時的編碼,默認UTF-8.
flyway.ignore-failed-future-migration #當讀取元數據表時是否忽略錯誤的遷移,默認false.
flyway.init-sqls #當初始化好連接時要執行的SQL.
flyway.locations #遷移腳本的位置,默認db/migration.
flyway.out-of-order #是否允許無序的遷移,默認false.
flyway.password #目標數據庫的密碼.
flyway.placeholder-prefix #設置每個placeholder的前綴,默認${.
flyway.placeholder-replacement #placeholders是否要被替換,默認true.
flyway.placeholder-suffix #設置每個placeholder的后綴,默認}.
flyway.placeholders.[placeholder name] #設置placeholder的value
flyway.schemas #設定需要flywary遷移的schema,大小寫敏感,默認為連接默認的schema.
flyway.sql-migration-prefix #遷移文件的前綴,默認為V.
flyway.sql-migration-separator #遷移腳本的文件名分隔符,默認__
flyway.sql-migration-suffix #遷移腳本的后綴,默認為.sql
flyway.table #flyway使用的元數據表名,默認為schema_version
flyway.target #遷移時使用的目標版本,默認為latest version
flyway.url #遷移時使用的JDBC URL,如果沒有指定的話,將使用配置的主數據源
flyway.user #遷移數據庫的用戶名
flyway.validate-on-migrate #遷移時是否校驗,默認為true.#FREEMARKER(FreeMarkerAutoConfiguration)
spring.freemarker.allowRequestOverride = false #設置HttpServletRequest屬性是否允許覆蓋(隱藏)控制器生成的相同名稱的模型屬性。
spring.freemarker.allowSessionOverride = false #設置HttpSession屬性是否允許覆蓋(隱藏)控制器生成的相同名稱的模型屬性。
spring.freemarker.cache = true #使用模板緩存。
spring.freemarker.charset=UTF-8 # Template encoding.
spring.freemarker.checkTemplateLocation = true #檢查模板位置是否存在spring.freemarker.check-template-location=true
spring.freemarker.contentType = text / html #Content-Type
spring.freemarker.exposeRequestAttributes = false #在與模板合并之前,設置是否應該將所有請求屬性添加到模型中。spring.freemarker.expose-request-attributes=false
spring.freemarker.exposeSessionAttributes = false #在與模板合并之前,設置是否應該將所有HttpSession屬性添加到模型中。spring.freemarker.expose-session-attributes=false
spring.freemarker.exposeSpringMacroHelpers = false #設定是否以springMacroRequestContext的形式暴露RequestContext給Spring’s macro library使用 spring.freemarker.expose-spring-macro-helpers=true
spring.freemarker.prefer-file-system-access=true #是否優先從文件系統加載template,以支持熱加載,默認為true
spring.freemarker.prefix = #在構建URL時,前綴被預先指定以查看名稱。
spring.freemarker.requestContextAttribute = #所有視圖的RequestContext屬性的名稱. freemarker.request-context-attribute=
spring.freemarker.settings.* = #Well-known FreeMarker keys which will be passed to FreeMarker's Configuration
spring.freemarker.suffix = .ftl #在構建URL時附加到視圖名稱后面的后綴
spring.freemarker.templateEncoding = UTF- 8
spring.freemarker.templateLoaderPath =classpath:/templates #設定ftl文件路徑 類路徑:/模板/
spring.freemarker.viewNames = #可以解析的視圖名稱的白名單
spring.mvc.static-path-pattern=/static/** #設定靜態文件路徑,js,css等
#GIT信息
spring.git.properties = #生成的git信息屬性文件的資源引用。
#GROOVY模板(GroovyTemplateAutoConfiguration)
spring.groovy.template.allow-request-override #指定HttpServletRequest的屬性是否可以覆蓋controller的model的同名項
spring.groovy.template.allow-session-override #指定HttpSession的屬性是否可以覆蓋controller的model的同名項
spring.groovy.template.cache #是否開啟模板緩存
.spring.groovy.template.charset #指定Template編碼
.spring.groovy.template.check-template-location #是否檢查模板的路徑是否存在.
spring.groovy.template.configuration.auto-escape #是否在渲染模板時自動排查model的變量,默認為: 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 #指定template base class.
spring.groovy.template.configuration.cache-templates #是否要緩存模板,默認為true
spring.groovy.template.configuration.declaration-encoding #在寫入declaration header時使用的編碼
spring.groovy.template.configuration.expand-empty-elements #是使用<br/>這種形式,還是<br></br>這種展開模式,默認為: false)
spring.groovy.template.configuration.locale #指定template 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模板的支持.
spring.groovy.template.expose-request-attributes #設定所有request的屬性在merge到模板的時候,是否要都添加到model中.
spring.groovy.template.expose-session-attributes #設定所有request的屬性在merge到模板的時候,是否要都添加到model中.
spring.groovy.template.expose-spring-macro-helpers #設定是否以springMacroRequestContext的形式暴露RequestContext給Spring’s macro library使用
spring.groovy.template.prefix #指定模板的前綴.
spring.groovy.template.request-context-attribute #指定RequestContext屬性的名.
spring.groovy.template.resource-loader-path #指定模板的路徑,默認為: classpath:/templates/
spring.groovy.template.suffix #指定模板的后綴
spring.groovy.template.view-names #指定要使用模板的視圖名稱.
#h2
spring.h2.console.enabled #是否開啟控制臺,默認為false
spring.h2.console.path #指定控制臺路徑,默認為: /h2-console
#hornetq (HornetQProperties)
spring.hornetq.embedded.cluster-password #指定集群的密碼,默認啟動時隨機生成.
spring.hornetq.embedded.data-directory #指定Journal file 的目錄. 如果不開啟持久化則不必指定.
spring.hornetq.embedded.enabled #是否開啟內嵌模式,默認:true
spring.hornetq.embedded.persistent #是否開啟persistent store,默認: false
spring.hornetq.embedded.queues #指定啟動是創建的queue,多個以逗號分隔,默認: []
spring.hornetq.embedded.server-id #指定Server ID. 默認使用自增數字,從0開始.
spring.hornetq.embedded.topics #指定啟動時創建的topic,多個以逗號分隔,默認: []
spring.hornetq.host #指定HornetQ broker 的host,默認: localhost
spring.hornetq.mode #指定HornetQ 的部署模式,默認是auto-detected,也可以指定native 或者 embedded.
spring.hornetq.port #指定HornetQ broker 端口,默認: 5445
#http
spring.hateoas.apply-to-primary-object-mapper #設定是否對object mapper也支持HATEOAS,默認為: true
spring.http.converters.preferred-json-mapper #是否優先使用JSON mapper來轉換.
spring.http.encoding.charset #指定http請求和相應的Charset,默認: UTF-8
spring.http.encoding.enabled #是否開啟http的編碼支持,默認為true
spring.http.encoding.force #是否強制對http請求和響應進行編碼,默認為true
#jersey
spring.jersey.filter.order #指定Jersey filter的order,默認為: 0
spring.jersey.init #指定傳遞給Jersey的初始化參數.
spring.jersey.type #指定Jersey的集成類型,可以是servlet或者filter.
#jms
spring.jms.jndi-name #指定Connection factory JNDI 名稱.
spring.jms.listener.acknowledge-mode #指定ack模式,默認自動ack.
spring.jms.listener.auto-startup #是否啟動時自動啟動jms,默認為: true
spring.jms.listener.concurrency #指定最小的并發消費者數量.
spring.jms.listener.max-concurrency #指定最大的并發消費者數量.
spring.jms.pub-sub-domain #是否使用默認的destination type來支持 publish/subscribe,默認: false
jmx
spring.jmx.default-domain #指定JMX domain name.
spring.jmx.enabled #是否暴露jmx,默認為true
spring.jmx.server #指定MBeanServer bean name. 默認為: mbeanServer)
#jooq
spring.jooq.sql-dialect #指定JOOQ使用的SQLDialect,比如POSTGRES.
#Messages
spring.messages.basename #指定message的basename,多個以逗號分隔,如果不加包名的話,默認從classpath路徑開始,默認: messages
spring.messages.cache-seconds #設定加載的資源文件緩存失效時間,-1的話為永不過期,默認為-1
spring.messages.encoding #設定Message bundles的編碼,默認: UTF-8
#JPA
spring.jpa.database #指定目標數據庫.
spring.jpa.database-platform #指定目標數據庫的類型.
spring.jpa.generate-ddl #是否在啟動時初始化schema,默認為false
spring.jpa.hibernate.ddl-auto #指定DDL mode (none, validate, update, create, create-drop). 當使用內嵌數據庫時,默認是create-drop,否則為none.
spring.jpa.hibernate.naming-strategy #指定命名策略.
spring.jpa.open-in-view #是否注冊OpenEntityManagerInViewInterceptor,綁定JPA EntityManager到請求線程中,默認為: true
spring.jpa.properties #添加額外的屬性到JPA provider.
spring.jpa.show-sql #是否開啟sql的log,默認為: false
#json
spring.jackson.date-format #指定日期格式,比如yyyy-MM-dd HH:mm:ss,或者具體的格式化類的全限定名
spring.jackson.deserialization #是否開啟Jackson的反序列化
spring.jackson.generator #是否開啟json的generators.
spring.jackson.joda-date-time-format #指定Joda date/time的格式,比如yyyy-MM-dd HH:mm:ss). 如果沒有配置的話,dateformat會作為backup
spring.jackson.locale #指定json使用的Locale.
spring.jackson.mapper #是否開啟Jackson通用的特性.
spring.jackson.parser #是否開啟jackson的parser特性.
spring.jackson.property-naming-strategy #指定PropertyNamingStrategy (CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES)或者指定PropertyNamingStrategy子類的全限定類名.
spring.jackson.serialization #是否開啟jackson的序列化.
spring.jackson.serialization-inclusion #指定序列化時屬性的inclusion方式,具體查看JsonInclude.Include枚舉.
spring.jackson.time-zone #指定日期格式化時區,比如America/Los_Angeles或者GMT+10.
#JTA
spring.jta.allow-multiple-lrc #是否允許 multiple LRC,默認為: false
spring.jta.asynchronous2-pc #指定兩階段提交是否可以異步,默認為: false
spring.jta.background-recovery-interval #指定多少分鐘跑一次recovery process,默認為: 1
spring.jta.background-recovery-interval-seconds #指定多久跑一次recovery process,默認: 60
spring.jta.current-node-only-recovery #是否過濾掉其他非本JVM的recovery,默認為: true
spring.jta.debug-zero-resource-transaction #是否追蹤沒有使用指定資源的事務,默認為: false
spring.jta.default-transaction-timeout #設定默認的事務超時時間,默認為60
spring.jta.disable-jmx #是否禁用jmx,默認為false
spring.jta.enabled #是否開啟JTA support,默認為: true
spring.jta.exception-analyzer #設置指定的異常分析類
spring.jta.filter-log-status #使用Bitronix Transaction Manager時,是否寫mandatory logs,開啟的話,可以節省磁盤空間,但是調試會復雜寫,默認為false
spring.jta.force-batching-enabled #使用Bitronix Transaction Manager時,是否批量寫磁盤,默認為true.
spring.jta.forced-write-enabled #使用Bitronix Transaction Manager時,是否強制寫日志到磁盤,默認為true
spring.jta.graceful-shutdown-interval #當使用Bitronix Transaction Manager,指定shutdown時等待事務結束的時間,超過則中斷,默認為60
spring.jta.jndi-transaction-synchronization-registry-name #當使用Bitronix Transaction Manager時,在JNDI下得事務同步registry,默認為: java:comp/TransactionSynchronizationRegistry
spring.jta.jndi-user-transaction-name #指定在JNDI使用Bitronix Transaction Manager的名稱,默認:java:comp/UserTransaction
spring.jta.journal #當使用Bitronix Transaction Manager,指定The journal是否disk還是null還是一個類的全限定名,默認disk
spring.jta.log-dir #Transaction logs directory.
spring.jta.log-part1-filename #指定The journal fragment文件1的名字,默認: btm1.tlog
spring.jta.log-part2-filename #指定The journal fragment文件2的名字,默認: btm2.tlog
spring.jta.max-log-size-in-mb #指定journal fragments大小的最大值. 默認: 2M
spring.jta.resource-configuration-filename #指定Bitronix Transaction Manager配置文件名.
spring.jta.server-id #指定Bitronix Transaction Manager實例的id.
spring.jta.skip-corrupted-logs #是否忽略corrupted log files文件,默認為false.
spring.jta.transaction-manager-id #指定Transaction manager的唯一標識.
spring.jta.warn-about-zero-resource-transaction #當使用Bitronix Transaction Manager時,是否對沒有使用指定資源的事務進行警告,默認為: true
#mail
spring.mail.default-encoding #指定默認MimeMessage的編碼,默認為: 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使用的協議,默認為: smtp
spring.mail.test-connection #指定是否在啟動時測試郵件服務器連接,默認為false
spring.mail.username #指定SMTP server的用戶名.
#mobile
spring.mobile.devicedelegatingviewresolver.enable-fallback #是否支持fallback的解決方案,默認false
spring.mobile.devicedelegatingviewresolver.enabled #是否開始device view resolver,默認為: false
spring.mobile.devicedelegatingviewresolver.mobile-prefix #設定mobile端視圖的前綴,默認為:mobile/
spring.mobile.devicedelegatingviewresolver.mobile-suffix #設定mobile視圖的后綴
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
#MONGODB(Mongo性能)
spring.data.mongodb.host = #分貝主機
spring.data.mongodb.port = 27017 #連接端口(默認為 27107 )
spring.data.mongodb.uri = #連接URL
spring.mongodb.embedded.features #指定要開啟的特性,逗號分隔.
spring.mongodb.embedded.version #指定要使用的版本,默認: 2.6.10
#MANAGEMENT HTTP SERVER(ManagementServerProperties)
management.add-application-context-header = true#在每個響應中添加“X-Application-Context”HTTP標頭。
management.address = #管理端點應該綁定的網絡地址。
management.context-path = #管理端點上下文路徑。例如`/執行器`
management.port = #管理端點HTTP端口。默認使用與應用程序相同的端口。
management.security.enabled = true #啟用
management.security.role = ADMIN #訪問管理端點所需的角色。
management.security.sessions #會話創建策略使用(always, never, if_required, stateless)。 #HEALTH INDICATORS健康指標(以前的健康狀況*)
management.health.db.enabled = true #啟用數據庫運行狀況檢查。
management.health.defaults.enabled = true #啟用默認健康指標。
management.health.diskspace.enabled = true #啟用磁盤空間運行狀況檢查。
management.health.diskspace.path = #用于計算可用磁盤空間的路徑。
management.health.diskspace.threshold = 0 #應該可用的最小磁盤空間(以字節為單位)。
management.health.elasticsearch.enabled = true #啟用elasticsearch運行狀況檢查。
management.health.elasticsearch.indices = #逗號分隔的索引名稱。
management.health.elasticsearch.response-timeout = 100 #等待群集響應的時間(以毫秒為單位)。
management.health.jms.enabled = true #啟用JMS運行狀況檢查。
management.health.mail.enabled = true #啟用郵件運行狀況檢查。
management.health.mongo.enabled = true #啟用MongoDB運行狀況檢查。
management.health.rabbit.enabled = true #啟用RabbitMQ健康檢查。
management.health.redis.enabled = true #啟用Redis運行狀況檢查。
management.health.solr.enabled = true #啟用Solr運行狀況檢查。
management.health.status.order #以逗號分隔的健康狀態列表。
management.trace.include #要包含在跟蹤中的項目。
#METRICS EXPORT(MetricExportProperties)
spring.metrics.export.aggregate.key-pattern = #告訴聚合器如何處理源存儲庫中的密鑰的模式。
spring.metrics.export.aggregate.prefix = #全局存儲庫的前綴(如果處于活動狀態)。
spring.metrics.export.delay-millis = 5000 #輸出滴答之間的延遲(以毫秒為單位)。度量標準按照計劃導出到外部源。
spring.metrics.export.enabled = true #啟用metric 標準導出的標志(假設MetricWriter可用)。
spring.metrics.export.excludes = #要排除的metric 標準名稱的模式列表。包括后應用。
spring.metrics.export.includes = #要包含的metric 標準名稱的模式列表。
spring.metrics.export.redis.key #Redis存儲庫導出密鑰(如果有效)。
spring.metrics.export.redis.prefix #如果處于活動狀態,redis存儲庫的前綴。
spring.metrics.export.send-latest #根據不導出不變的metric 值的標志關閉所有可用的優化。
spring.metrics.export.statsd.host = #接收導出metric 的statsd server的主機。
spring.metrics.export.statsd.port = 8125 #接收導出metric的statsd server的端口。
spring.metrics.export.statsd.prefix = #統計導出metric的前綴。
spring.metrics.export.triggers。* = #每個MetricWriter bean名稱的特定觸發器屬性。
#multipart
multipart.enabled #是否開啟文件上傳支持,默認為true
multipart.file-size-threshold #設定文件寫入磁盤的閾值,單位為MB或KB,默認為0
multipart.location #指定文件上傳路徑.
multipart.max-file-size #指定文件大小最大值,默認1MB
multipart.max-request-size #指定每次請求的最大值,默認為10MB
#mustcache
spring.mustache.cache #是否Enable template caching.
spring.mustache.charset #指定Template的編碼.
spring.mustache.check-template-location #是否檢查默認的路徑是否存在.
spring.mustache.content-type #指定Content-Type.
spring.mustache.enabled #是否開啟mustcache的模板支持.
spring.mustache.prefix #指定模板的前綴,默認: classpath:/templates/
spring.mustache.suffix #指定模板的后綴,默認: .html
spring.mustache.view-names #指定要使用模板的視圖名.
#MVC(SPRING MVC相關的一些配置)
http.mappers.json-pretty-print = false #打印JSON
http.mappers.json-sort-keys = false #排序鍵
spring.mvc.locale = #設置固定語言環境,例如en_UK
spring.mvc.date-format = #設置固定的日期格式,例如dd / MM / yyyy
spring.mvc.async.request-timeout #設定async請求的超時時間,以毫秒為單位,如果沒有設置的話,以具體實現的超時時間為準,比如tomcat的servlet3的話是10秒.
spring.mvc.favicon.enabled #是否支持favicon.ico,默認為: true
spring.mvc.ignore-default-model-on-redirect #在重定向時是否忽略默認model的內容,默認為true
spring.mvc.locale#指定使用的Locale.
spring.mvc.message-codes-resolver-format #指定message codes的格式化策略(PREFIX_ERROR_CODE,POSTFIX_ERROR_CODE).
spring.view.prefix = #MVC視圖前綴
spring.view.suffix = #...和后綴
spring.resources.cache-period = #發送到瀏覽器的標題緩存超時
spring.resources.add-mappings = true #如果 應該添加默認映射
#liquibase
liquibase.change-log #Change log 配置文件的路徑,默認值為classpath:/db/changelog/db.changelog-master.yaml
liquibase.check-change-log-location #是否堅持change log的位置是否存在,默認為true.
liquibase.contexts #逗號分隔的運行時context列表.
liquibase.default-schema #默認的schema.
liquibase.drop-first #是否首先drop schema,默認為false
liquibase.enabled #是否開啟liquibase,默認為true.
liquibase.password #目標數據庫密碼
liquibase.url #要遷移的JDBC URL,如果沒有指定的話,將使用配置的主數據源.
liquibase.user #目標數據用戶名
#logging日志
logging.path = #文件路徑
logging.file = myapp.log #文件名稱
logging.config = #如果你即想完全掌控日志配置,但又不想用logback.xml作為Logback配置的名字,可以通過logging.config屬性指定自定義的名字
logging.level.root=INFO #日志級別 從控制臺打印出來的日志級別只有ERROR, WARN 還有INFO,如果你想要打印debug級別的日志,可以配置debug=true
logging.level.org.springframework.web=DEBUG
logging.level.org.hibernate=ERROR
#rabbitmq
spring.rabbitmq.addresses #指定client連接到的server的地址,多個以逗號分隔.
spring.rabbitmq.dynamic #是否創建AmqpAdmin bean. 默認為: true)
spring.rabbitmq.host #指定RabbitMQ host.默認為: localhost)
spring.rabbitmq.listener.acknowledge-mode #指定Acknowledge的模式.
spring.rabbitmq.listener.auto-startup #是否在啟動時就啟動mq,默認: true)
spring.rabbitmq.listener.concurrency #指定最小的消費者數量.
spring.rabbitmq.listener.max-concurrency #指定最大的消費者數量.
spring.rabbitmq.listener.prefetch #指定一個請求能處理多少個消息,如果有事務的話,必須大于等于transaction數量.
spring.rabbitmq.listener.transaction-size #指定一個事務處理的消息數量,最好是小于等于prefetch的數量.
spring.rabbitmq.password #指定broker的密碼.
spring.rabbitmq.port #指定RabbitMQ 的端口,默認: 5672)
spring.rabbitmq.requested-heartbeat #指定心跳超時,0為不指定.
spring.rabbitmq.ssl.enabled #是否開始SSL,默認: false)
spring.rabbitmq.ssl.key-store #指定持有SSL certificate的key store的路徑
spring.rabbitmq.ssl.key-store-password #指定訪問key store的密碼.
spring.rabbitmq.ssl.trust-store #指定持有SSL certificates的Trust store.
spring.rabbitmq.ssl.trust-store-password #指定訪問trust store的密碼.
spring.rabbitmq.username #指定登陸broker的用戶名.
spring.rabbitmq.virtual-host #指定連接到broker的Virtual host.
#redis
spring.redis.database #指定連接工廠使用的Database index,默認為: 0
spring.redis.host #指定Redis server host,默認為: localhost
spring.redis.password #指定Redis server的密碼
spring.redis.pool.max-active #指定連接池最大的活躍連接數,-1表示無限,默認為8
spring.redis.pool.max-idle #指定連接池最大的空閑連接數,-1表示無限,默認為8
spring.redis.pool.max-wait #指定當連接池耗盡時,新獲取連接需要等待的最大時間,以毫秒單位,-1表示無限等待
spring.redis.pool.min-idle #指定連接池中空閑連接的最小數量,默認為0
spring.redis.port #指定redis服務端端口,默認: 6379
spring.redis.sentinel.master #指定redis server的名稱
spring.redis.sentinel.nodes #指定sentinel節點,逗號分隔,格式為host:port.
spring.redis.timeout #指定連接超時時間,毫秒單位,默認為0
#resource
spring.resources.add-mappings #是否開啟默認的資源處理,默認為true
spring.resources.cache-period #設定資源的緩存時效,以秒為單位.
spring.resources.chain.cache #是否開啟緩存,默認為: true
spring.resources.chain.enabled #是否開啟資源 handling chain,默認為false
spring.resources.chain.html-application-cache #是否開啟h5應用的cache manifest重寫,默認為: 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:/
#security spring security是springboot支持的權限控制系統。
security.basic.authorize-mode #要使用權限控制模式.
security.basic.enabled #是否開啟基本的鑒權,默認為true
security.basic.path #需要鑒權的path,多個的話以逗號分隔,默認為[/**]
security.basic.realm #HTTP basic realm 的名字,默認為Spring
security.enable-csrf #是否開啟cross-site request forgery校驗,默認為false.
security.filter-order #Security filter chain的order,默認為0
security.headers.cache #是否開啟http頭部的cache控制,默認為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 (XSS) 保護,默認為false.
security.ignored #指定不鑒權的路徑,多個的話以逗號分隔.
security.oauth2.client.access-token-uri #指定獲取access token的URI.
security.oauth2.client.access-token-validity-seconds #指定access token失效時長.
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 #指定客戶端允許的grant types.
security.oauth2.client.auto-approve-scopes #對客戶端自動授權的scope.
security.oauth2.client.client-authentication-scheme #傳輸authentication credentials的方式(form, header, none, query),默認為header方式
security.oauth2.client.client-id #指定OAuth2 client ID.
security.oauth2.client.client-secret #指定OAuth2 client secret. 默認是一個隨機的secret.
security.oauth2.client.grant-type #指定獲取資源的access token的授權類型.
security.oauth2.client.id #指定應用的client ID.
security.oauth2.client.pre-established-redirect-uri #服務端pre-established的跳轉URI.
security.oauth2.client.refresh-token-validity-seconds #指定refresh token的有效期.
security.oauth2.client.registered-redirect-uri #指定客戶端跳轉URI,多個以逗號分隔.
security.oauth2.client.resource-ids #指定客戶端相關的資源id,多個以逗號分隔.
security.oauth2.client.scope #client的scope
security.oauth2.client.token-name #指定token的名稱
security.oauth2.client.use-current-uri #是否優先使用請求中URI,再使用pre-established的跳轉URI. 默認為true
security.oauth2.client.user-authorization-uri #用戶跳轉去獲取access token的URI.
security.oauth2.resource.id #指定resource的唯一標識.
security.oauth2.resource.jwt.key-uri #JWT token的URI. 當key為公鑰時,或者value不指定時指定.
security.oauth2.resource.jwt.key-value #JWT token驗證的value. 可以是對稱加密或者PEMencoded RSA公鑰. 可以使用URI作為value.
security.oauth2.resource.prefer-token-info #是否使用token info,默認為true
security.oauth2.resource.service-id #指定service ID,默認為resource.
security.oauth2.resource.token-info-uri #token解碼的URI.
security.oauth2.resource.token-type #指定當使用userInfoUri時,發送的token類型.
security.oauth2.resource.user-info-uri #指定user info的URI
security.oauth2.sso.filter-order #如果沒有顯示提供WebSecurityConfigurerAdapter時指定的Filter order.
security.oauth2.sso.login-path #跳轉到SSO的登錄路徑默認為/login.
security.require-ssl #是否對所有請求開啟SSL,默認為false.
security.sessions #指定Session的創建策略(always, never, if_required, stateless).
security.user.name #指定默認的用戶名,默認為user.
security.user.password #默認的用戶密碼.
security.user.role #默認用戶的授權角色.
#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.
#server配置
server.address #指定server綁定的地址
server.compression.enabled #是否開啟壓縮,默認為false.
server.compression.excluded-user-agents #指定不壓縮的user-agent,多個以逗號分隔,默認值為:text/html,text/xml,text/plain,text/css
server.compression.mime-types #指定要壓縮的MIME type,多個以逗號分隔.
server.compression.min-response-size #執行壓縮的閾值,默認為2048
server.context-parameters.[param name] #設置servlet context 參數
server.context-path #設定應用的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 #設定dispatcher servlet的監聽路徑,默認為: /
#SHELL REMOTE SHELL
shell.auth = simple #認證類型。根據環境自動檢測。
shell.auth.jaas.domain =my-domain #JAAS域。
shell.auth.key.path = #認證密鑰的路徑。這應該指向一個有效的“.pem”文件。
shell.auth.simple.user.name = user #登錄用戶。
shell.auth.simple.user.password = #登錄密碼。
shell.auth.spring.roles = ADMIN #用于登錄到CRaSH控制臺的所需角色的逗號分隔列表。
shell.command-path-patterns = classpath *:/ commands / **,classpath *:/ crash / commands / **#用于查找命令的模式。
shell.command-refresh-interval = -1 #掃描更改并在必要時更新命令(以秒為單位)。
shell.config-path-patterns = #用于查找配置的模式。
shell.disabled-commands #禁用命令的逗號分隔列表。
shell.disabled-plugins = #禁用逗號分隔的插件列表。根據環境,某些插件默認是禁用的。
shell.ssh.auth-timeout = #用戶提示重新登錄后的毫秒數。
shell.ssh.enabled = true #啟用CRaSH SSH支持。
shell.ssh.idle-timeout = #關閉未使用的連接之后的毫秒數。
shell.ssh.key-path = #SSH服務器密鑰的路徑。
shell.ssh.port = 2000 #SSH端口。
shell.telnet.enabled = false #啟用CRaSH telnet支持。如果TelnetPlugin可用,則默認啟用。
shell.telnet.port = 5000 #Telnet端口。
#social
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 #指定應用密碼
#ssl配置
server.ssl.ciphers #是否支持SSL ciphers.
server.ssl.client-auth #設定client authentication是wanted 還是 needed.
server.ssl.enabled #是否開啟ssl,默認: true
server.ssl.key-alias #設定key store中key的別名.
server.ssl.key-password #訪問key store中key的密碼.
server.ssl.key-store #設定持有SSL certificate的key store的路徑,通常是一個.jks文件.
server.ssl.key-store-password #設定訪問key store的密碼.
server.ssl.key-store-provider #設定key store的提供者.
server.ssl.key-store-type #設定key store的類型.
server.ssl.protocol #使用的SSL協議,默認: TLS
server.ssl.trust-store #持有SSL certificates的Trust store.
server.ssl.trust-store-password #訪問trust store的密碼.
server.ssl.trust-store-provider #設定trust store的提供者.
server.ssl.trust-store-type #指定trust store的類型.
#tomcat服務器配置(ServerProperties)
server.port = 8080 #端口
server.address = #該服務綁定IP地址,啟動服務器時如本機不是該IP地址則拋出異常啟動失敗,只有特殊需求的情況下才配置
server.session-timeout = #會話超時秒數 默認30
server.context-path = #上下文路徑,默認為 '/'
server.servlet-path = #servlet路徑,默認為 '/'
server.tomcat.access-log-pattern = #訪問日志的日志模式
server.tomcat.access-log-enabled = false #啟用訪問日志記錄
server.tomcat.protocol-header = x -forwarded-proto #ssl轉發標頭
server.tomcat.accesslog.pattern #設定access logs的格式,默認: common
server.tomcat.accesslog.prefix #設定Log 文件的前綴,默認: access_log
server.tomcat.accesslog.suffix #設定Log 文件的后綴,默認: .log
server.tomcat.background-processor-delay = 30 ; # 后臺線程方法的Delay大小: 30
server.tomcat.basedir #設定Tomcat的base 目錄,如果沒有指定則使用臨時目錄.
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 header的最小值,默認: 0
server.tomcat.max-threads #設定tomcat的最大工作線程數,默認為: 0
server.tomcat.port-header #設定http header使用的,用來覆蓋原來port的value.
server.tomcat.protocol-header #設定Header包含的協議,通常是 X-Forwarded-Proto,如果remoteIpHeader有值,則將設置為RemoteIpValve.
server.tomcat.protocol-header-https-value #設定使用SSL的header的值,默認https.
server.tomcat.remote-ip-header #設定remote IP的header,如果remoteIpHeader有值,則設置為RemoteIpValve
server.tomcat.uri-encoding #設定URI的解碼字符集.
#THYMELEAF(Thymeleaf 模板)
spring.thymeleaf.prefix = #類路徑:/模板/ 檢查模板位置
spring.thymeleaf.suffix =
spring.thymeleaf.mode = HTML5 #模板的模式
spring.thymeleaf.encoding = UTF- 8
spring.thymeleaf.content-type = text / html#; charset = <編碼>
spring.thymeleaf.cache = true #這個開發配置為false,避免改了模板還要重啟服務器
#undertow
server.undertow.access-log-dir #設定Undertow access log 的目錄,默認: logs
server.undertow.access-log-enabled #是否開啟access log,默認: false
server.undertow.access-log-pattern #設定access logs的格式,默認: common
server.undertow.accesslog.dir #設定access log 的目錄.
server.undertow.buffer-size #設定buffer的大小.
server.undertow.buffers-per-region #設定每個region的buffer數
server.undertow.direct-buffers #設定堆外內存
server.undertow.io-threads #設定I/O線程數.
server.undertow.worker-threads #設定工作線程數
#velocity
spring.velocity.allow-request-override #指定HttpServletRequest的屬性是否可以覆蓋controller的model的同名項
spring.velocity.allow-session-override #指定HttpSession的屬性是否可以覆蓋controller的model的同名項
spring.velocity.cache #是否開啟模板緩存
spring.velocity.charset #設定模板編碼
spring.velocity.check-template-location #是否檢查模板路徑是否存在.
spring.velocity.content-type #設定ContentType的值
spring.velocity.date-tool-attribute #設定暴露給velocity上下文使用的DateTool的名
spring.velocity.enabled #設定是否允許mvc使用velocity
spring.velocity.expose-request-attributes #是否在merge模板的時候,將request屬性都添加到model中
spring.velocity.expose-session-attributes #是否在merge模板的時候,將HttpSession屬性都添加到model中
spring.velocity.expose-spring-macro-helpers #設定是否以springMacroRequestContext的名來暴露RequestContext給Spring’s macro類庫使用
spring.velocity.number-tool-attribute #設定暴露給velocity上下文的NumberTool的名
spring.velocity.prefer-file-system-access #是否優先從文件系統加載模板以支持熱加載,默認為true
spring.velocity.prefix #設定velocity模板的前綴.
spring.velocity.properties #設置velocity的額外屬性.
spring.velocity.request-context-attribute #設定RequestContext attribute的名.
spring.velocity.resource-loader-path #設定模板路徑,默認為: classpath:/templates/
spring.velocity.suffix #設定velocity模板的后綴.
spring.velocity.toolbox-config-location #設定Velocity Toolbox配置文件的路徑,比如 /WEB-INF/toolbox.xml.
spring.velocity.view-names #設定需要解析的視圖名稱.