Spring Boot和GCP:没有符合条件的org.springframework.cloud.gcp.secretmanager.SecretManagerTemplate类型的bean

问题描述

连接到GCP以从机密管理器获取机密时出错,但是不知怎么对我不起作用。

以以下方式运行应用程序时出错:

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

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

secretManagerTemplate.getSecretString(keyName);

详细信息:

  • Spring Boot版本:2.1.8
  • Spring Cloud版本:Greenwich.RELEASE
  • Spring Cloud GCP版本1.2.5.RELEASE
  • @H_502_23@

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

    请帮助。

    解决方法

    暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

    如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

    小编邮箱:dio#foxmail.com (将#修改为@)