首页 > 解决方案 > Spring Boot 和 GCP:没有 org.springframework.cloud.gcp.secretmanager.SecretManagerTemplate 类型的合格 bean

问题描述

连接到 GCP 以从秘密管理器获取秘密时出错,但不知何故它对我不起作用。

运行应用程序时出现错误:

没有 org.springframework.cloud.gcp.secretmanager.SecretManagerTemplate 类型的合格 bean

我正在使用如下 SecretManagerTemplate 来获取秘密:

secretManagerTemplate.getSecretString(keyName);

细节:

注意:我不想升级 Spring Boot 版本。

请帮忙。

标签: spring-bootgoogle-cloud-platformspring-cloud-gcpgoogle-secret-manager

解决方案


推荐阅读