【发布时间】:2020-11-13 18:10:22
【问题描述】:
我按照setting secret manager with GCP on Spring Boot上的说明,在Google Cloud中创建了一个secret,并在application.properties中添加了以下内容
spring.datasource.password=${sm://DB_PASSWORD}
没用,不过,如果我用SecretManagerTemplate,我可以通过secretManagerTemplate.getSecretString("DB_PASSWORD");得到秘密
但是,我需要在应用程序开始时初始化数据源密码,有人在spring boot中使用过secret manager吗?
【问题讨论】:
标签: spring spring-boot google-cloud-platform google-secret-manager