【发布时间】: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