我正在尝试启动正在写入 SQS 队列的 spring-int-aws 流,但不会加载上下文。
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 (v 1.0.0-RELEASE) 内部,它尝试使用已声明的 AmazonSQS 对象创建 QueueMessagingTemplate,但是 QueueMessagingTemplate (v1.1.3 Release) 它需要构造函数中的 AmazonSQSAsync 对象。由于 spring-cloud-aws 使用子接口,看来 spring-int-aws 也应该如此。
我是否遗漏了什么,或者这应该是针对该项目提出的问题?