Azure KeyVault 服务问题

问题描述

目前,我在 SpringBoot 版本 2.3.0.RELEASE 上运行的应用程序之一中使用 Azure keyvault 服务 使用 SAP Cloud SDK 3.35.0 版,该版本不适用于 bootstrap.yml 中的以下配置。这是获取配置服务器凭据所必需的

azure:
  keyvault:
    enabled: true
    uri: 
    client-id: 
    client-key: 
    tenant-id: 
spring:
  cloud:
    config:
      uri: https://test:${config-server-creds}@xxx.com

使用 pom.xml

<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-keyvault-secrets-spring-boot-starter</artifactId>
    <version>2.3.3</version>
    <scope>runtime</scope>
</dependency>

  

应用程序启动时,控制台中不会打印任何日志。关于这个问题有什么想法吗?是否有任何 Sprinboot 版本问题。

解决方法

请添加 POM 文件以轻松评估问题。

我检查了 com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter:2.3.3,我发现它引用了 org.springframework.boot:spring-boot-starter:2.3.2.RELEASE,而应该是 org.springframework.boot:spring-boot-starter:2.3.5.RELEASE

为了建立版本兼容性,我建议使用 com.azure.spring:azure-spring-boot-starter-keyvault-secrets:3.1.0