我按照在 Spring Boot 上使用 GCP 设置秘密管理器的说明,在 Google Cloud 中创建了一个秘密,并在 application.properties 中添加了以下内容
spring.datasource.password=${sm://DB_PASSWORD}
它没有用,但是,如果我使用SecretManagerTemplate
,我可以通过secretManagerTemplate.getSecretString("DB_PASSWORD");
但是,我需要在应用程序开始时初始化数据源密码,有人在spring boot中使用过secret manager吗?