Spring-boot AwsCrtAsyncHttpClient 和 NettyNioAsyncHttpClient 都在类路径中

问题描述 投票:0回答:1

在我的应用程序中,我使用自定义实施的 AWS SNS 模块。在该模块中,我确实为

AwsCrtAsyncHttpClient
用法创建了一个
SnsAsyncClient
的 bean。但是,我收到以下错误...

nested exception is software.amazon.awssdk.core.exception.SdkClientException: Multiple HTTP implementations were found on the classpath

原因是,其他依赖项(例如

AWS CloudWatch
S3
DynamoDB
SQS
)都有
netty-nio-client
的默认实现,即
NettyNioAsyncHttpClient
。我必须排除该依赖关系才能运行该应用程序。还有其他建议让我在 SNS 实现中使用
AwsCrtAsyncHttpClient
并让
NettyNioAsyncHttpClient
保持原样而不排除吗?预先感谢您。

java amazon-web-services spring-boot httpclient
1个回答
0
投票

我能够通过以下帖子找到有意义的回复! https://github.com/aws/aws-sdk-java-v2/issues/3761

© www.soinside.com 2019 - 2024. All rights reserved.