You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Spring Boot 3 适配哪个Spring Cloud AWS版本?SqsListener无法收消息

适配Spring Boot 3的Spring Cloud AWS版本说明
  • 核心结论:Spring Cloud AWS 2.x系列仅支持Spring Boot 2.x,适配Spring Boot 3必须使用Spring Cloud AWS 3.x正式版,无需使用里程碑版本。
  • 问题根源:你当前使用的2.4.2版本基于Spring Framework 5构建,和Spring Boot 3依赖的Spring Framework 6存在兼容性冲突,导致@SqsListener无法正常初始化并接收消息。
  • 正确依赖配置:替换原有依赖为3.x稳定版(示例以3.2.0为例,可根据官方发布选择最新稳定版):
    <dependencies>
        <dependency>
            <groupId>io.awspring.cloud</groupId>
            <artifactId>spring-cloud-starter-aws-messaging</artifactId>
        </dependency>
    </dependencies>
    
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.awspring.cloud</groupId>
                <artifactId>spring-cloud-aws-dependencies</artifactId>
                <version>3.2.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
  • 额外提示:Spring Cloud AWS 3.x使用AWS SDK v2,若原有代码存在直接调用AWS SDK v1的逻辑,需要同步调整为v2的API规范。

内容的提问来源于stack exchange,提问作者Don_Quijote

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.07 14:05:38