W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
postgresql
后端在Vault 0.7.1中已棄用,建議使用database
后端并將其安裝為postgresql
。spring.cloud.vault.postgresql
的配置將在以后的版本中刪除。
Spring Cloud Vault可以獲取PostgreSQL的憑據(jù)。可以通過設(shè)置spring.cloud.vault.postgresql.enabled=true
(默認值為false
)并為角色名稱提供spring.cloud.vault.postgresql.role=…
來啟用集成。
用戶名和密碼存儲在spring.datasource.username
和spring.datasource.password
中,因此使用Spring Boot將無需進一步配置即可獲取生成的憑據(jù)。您可以通過設(shè)置spring.cloud.vault.postgresql.username-property
和spring.cloud.vault.postgresql.password-property
來配置屬性名稱。
spring.cloud.vault: postgresql: enabled: true role: readonly backend: postgresql username-property: spring.datasource.username password-property: spring.datasource.password
enabled
將此值設(shè)置為true
可以啟用PostgreSQL后端配置
role
設(shè)置PostgreSQL角色定義的角色名稱
backend
設(shè)置要使用的PostgreSQL安裝路徑
username-property
設(shè)置存儲PostgreSQL用戶名的屬性名稱
password-property
設(shè)置存儲PostgreSQL密碼的屬性名稱
另請參閱:Vault文檔:使用Vault設(shè)置PostgreSQL
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: