spring-cloud-stream - org.springframework.messaging.converter.AbstractMessageConverter。([Lorg/springframework/util/MimeType;)V Spring Cloud Stream
问题描述
当我简单地从以下位置运行代码时,我遇到了以下错误:https ://github.com/shacko-samples/s1p-2019-scst-kafka-talk/tree/master/hello-streams-application 。
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-03-05 11:29:56.783 ERROR 24712 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.cloud.function.context.config.JsonMessageConverter.<init>(JsonMessageConverter.java:47)
The following method did not exist:
org.springframework.messaging.converter.AbstractMessageConverter.<init>([Lorg/springframework/util/MimeType;)V
The method's class, org.springframework.messaging.converter.AbstractMessageConverter, is available from the following locations:
jar:file:/C:/Users/user/.m2/repository/org/springframework/spring-messaging/5.2.0.RELEASE/spring-messaging-5.2.0.RELEASE.jar!/org/springframework/messaging/converter/AbstractMessageConverter.class
It was loaded from the following location:
file:/C:/Users/user/.m2/repository/org/springframework/spring-messaging/5.2.0.RELEASE/spring-messaging-5.2.0.RELEASE.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.messaging.converter.AbstractMessageConverter
解决方案
看起来您在类路径上的 spring-messaging 版本错误(不匹配)。该方法是在 Spring Framework 5.2.2 中添加的。
我看到该项目的 pom 正在使用快照。
我认为 Hoxton 在 SR5 前后从 Boot 2.2 切换到了 2.3。
在 pom 中,尝试将 Boot starter 更改为 2.3.9.RELEASE 并将 Hoxton 版本更改为Hoxton.SR10
.
如果这不起作用,请尝试 Boot 2.2.13.RELEASE 和 Hoxton.SR4。
推荐阅读
- tensorflow - 在 CNN 中上采样 [32x32x6] 层的正确方法是什么
- javascript - 用于写入 SQL 数据库的 php for 循环问题
- bash - 我想编写一个 BASH 脚本来查找当前日期,然后向用户致意,如下所示:
- python - 你能解释一下我发现的这个代码作为一个edabit问题的解决方案吗?
- node.js - @loadable/server 将整个统计信息 JSON 传递给 eval('require')(modulePath)
- node.js - net::ERR_CERT_AUTHORITY_INVALID(与节点反应)
- java - 在 Jenkins 上运行测试时,AspectJ 编织异常(org.aspectj.weaver.BCException:Whilst processing type..)
- python - 使用 pyodbc、存储过程和 SQL Server 执行
- java - 在 SpringBoot 测试结果中使用 ApplicationContextRunner 模拟依赖项到 UnsatisfiedDependencyException
- azure-container-service - 从云外壳创建 ACI 时,我可以创建新的 Azure ML 工作区吗