【问题标题】:Spring cloud streams: Supplier method not found issue with later version of spring bootSpring Cloud Streams:未找到更高版本的 Spring Boot 的供应商方法问题
【发布时间】:2021-11-06 21:26:52
【问题描述】:

我正在使用带有 com.azure.spring:azure-spring-cloud-stream-binder-eventhubs:2.8.0 的 Spring Cloud Streams,并且我正在使用供应商。

它适用于 Spring boot 2.3.12.RELEASE。

但是,如果我转到 Spring Boot 版本 >= 2.4.0,则会收到以下错误:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.cloud.stream.function.FunctionConfiguration.integrationFlowFromProvidedSupplier(FunctionConfiguration.java:252)

The following method did not exist:
org.springframework.integration.dsl.IntegrationFlows.from(Ljava/util/function/Supplier;)Lorg/springframework/integration/dsl/IntegrationFlowBuilder;

The method's class, org.springframework.integration.dsl.IntegrationFlows, is available from the following locations:
    jar:file:/Users/xxx/.m2/repository/org/springframework/integration/spring-integration-core/5.4.10/spring-integration-core-5.4.10.jar!/org/springframework/integration/dsl/IntegrationFlows.class

The class hierarchy was loaded from the following locations:
    org.springframework.integration.dsl.IntegrationFlows: file:/Users/xxx/.m2/repository/org/springframework/integration/spring-integration-core/5.4.10/spring-integration-core-5.4.10.jar

Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.integration.dsl.IntegrationFlows

任何想法如何使用更高版本的 Spring Boot?

如下所述,对于当前最新的 spring boot 2.4.5,org.springframework.cloud:spring-cloud-dependencies 需要 2020.0.3 版本

谢谢, 乙

【问题讨论】:

  • 您的版本可能不匹配;升级到较新的 Boot 版本时,您需要升级到较新的 Spring Cloud 版本。有关兼容版本,请参阅 Spring Cloud 页面上的表格。 spring.io/projects/spring-cloud
  • 感谢 gary,提供 spring 云依赖页面。

标签: spring-boot spring-cloud-stream


【解决方案1】:

有点混乱,但 2.3.12.RELEASE 在 2.4.0 之后发布

发布日期

  1. 2.3.12.RELEASE 版本 - 2021 年 6 月发布
  2. 2.4.0 版 - 2020 年 11 月发布

依赖层次结构:

Azure Spring Cloud Stream Event Hubs Binder » 2.8.0
|_ Azure Spring Cloud Starter Event Hubs » 2.8.0
|___ Azure Spring Integration Event Hubs » 2.8.0
|_____ Azure Spring Integration Core » 2.8.0
|_______ org.springframework.integration » spring-integration-core >> 5.5.2

可能的解决方案:

尝试将版本提高到 2.4.2 或更高版本

【讨论】:

    猜你喜欢
    • 2020-11-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-12
    • 2021-12-16
    • 2017-01-09
    • 2015-09-20
    • 2021-04-04
    • 1970-01-01
    相关资源
    最近更新 更多