【问题标题】:Spring Boot+ Azure service BusSpring Boot Azure 服务总线
【发布时间】:2022-01-27 09:49:19
【问题描述】:

我正在尝试将我的 Spring Boot 应用程序连接到 Azure 服务总线。当我在 pom.xml 文件中添加以下依赖项时,我在构建项目后遇到错误。

pom.xml 依赖:

    <dependency>
                <groupId>com.azure.spring</groupId>             
                <artifactId>azure-spring-boot-starter-servicebus-jms</artifactId>
                <version>3.10.0</version>
    </dependency>

遇到异常:

12-28-2021 15:28:15.779 EST [reactor-http-nio-1] 信息 c.a.s.k.secrets.SecretAsyncClient - 检索到的秘密 - npSigningStationBasicAuthPassword 12-28-2021 15:28:15.780 EST [main] INFO c.c.s.e.KeyVaultPropertyInitializer - 从密钥保管库获取属性:edocs.exact.target.apigee.apikey 12-28-2021 15:28:15.781 EST [main] INFO c.a.s.k.secrets.SecretAsyncClient - 检索秘密 - npExactTargetApiKey 2021 年 12 月 28 日 15:28:15.862 EST [reactor-http-nio-1] 信息 c.a.s.k.secrets.SecretAsyncClient - 检索到的秘密 - npExactTargetApiKey 2021 年 12 月 28 日 15:28:15.878 EST [main] 错误 os.boot.SpringApplication - 应用程序运行失败 org.springframework.core.convert.ConverterNotFoundException:找不到能够从类型 [com.azure.spring.cloudfoundry.environment.VcapResult] 转换为类型 [java.lang.String] 的转换器 在 org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:321) 在 org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:194) 在 org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:174)

【问题讨论】:

    标签: spring-boot azure azureservicebus azure-servicebus-queues


    【解决方案1】:

    在添加之前,您需要使用以下命令安装 Azure 服务总线 JMS 依赖项的 Azure Spring Boot Starter:

        mvn install
    

    稍后将依赖添加到 pom.xml 文件中。

        <dependency>  
            <groupId>com.azure.spring</groupId>  
            <artifactId>azure-spring-boot-starter-servicebus-jms</artifactId>  
            <version>3.10.0</version>  
        </dependency>
    

    稍后将以下依赖项添加到项目中:

    1. Add dependency to a Gradle project
    2. Add dependency to a SBT Scala project
    3. Add dependency to a Grape project

    【讨论】:

      猜你喜欢
      • 2017-08-15
      • 2021-03-26
      • 2018-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-09
      相关资源
      最近更新 更多