我正在尝试启动一个spring-int-aws流,该流正在写入SQS队列,但是上下文不会加载。
Error starting ApplicationContext. To display the auto-configuration report
re-run your application with 'debug' enabled.
2016-10-03 14:10:51.848 ERROR 3741 --- [ main]
o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.springframework.integration.aws.outbound.SqsMessageHandler#0':
Bean instantiation via constructor failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.integration.aws.outbound.SqsMessageHandler]: Constructor
threw exception; nested exception is java.lang.NoSuchMethodError:
org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate.<init
(Lcom/amazonaws/services/sqs/AmazonSQS;Lorg/springframework/cloud/aws/core/env/ResourceIdResolver;)V
....做了一些研究:在SQSMessageHandler (v1.0.0版本)中,它试图使用声明的AmazonSQS对象创建一个QueueMessagingTemplate,但是在QueueMessagingTemplate (v1.1.3版本)中,它需要在构造函数中有一个AmazonSQSAsync对象。由于spring-cloud-aws使用子接口,似乎spring-int-aws也应该如此。
我是否遗漏了什么,或者这应该是一个针对该项目的问题?
发布于 2016-10-04 05:21:58
spring-integration-aws是针对1.1.1构建的。
请在那里打开一个问题,这样我们就可以创建一个兼容的版本。
也就是说,Spring项目在一个点版本中破坏API是非常不寻常的,所以我们也应该为spring-cloud-aws提出一个问题,要求他们恢复另一个ctor (如果可能),并交叉链接这些问题。
在spring-integration-aws中做任何事情之前,我们会等待这个问题的解决(但我们仍然应该继续并支持异步选项)。
https://stackoverflow.com/questions/39840002
复制相似问题