使用Spring Cloud AWS时覆盖AWS SDK v2:官方文档疑似有误
AWS SDK V2 版本覆盖的正确配置
Spring Cloud AWS官方文档中给出的AWS SDK V2版本覆盖配置无法生效,文档中要求在其他AWS SDK BOM依赖前引入的配置如下:
<dependencyManagement> <dependencies> <dependency> <groupId>com.amazonaws</groupId> <artifactId>aws-java-sdk-bom</artifactId> <version>${aws-java-sdk.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
实际验证后,正确的版本覆盖配置应为:
<dependencyManagement> <dependencies> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>bom</artifactId> <version>${aws-java-sdk.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
对比Spring Cloud AWS代码库的依赖配置可以发现,其自身引用的正是software.amazon.awssdk:bom,这说明官方文档的内容存在错误。
内容的提问来源于stack exchange,提问作者Keith Bennett
相关产品推荐
相关产品推荐

