首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将AwsS3Client添加到spring boot项目

如何将AwsS3Client添加到spring boot项目
EN

Stack Overflow用户
提问于 2021-01-04 17:28:09
回答 2查看 397关注 0票数 0

我正在使用Spring Boot 2.4.1Spring Cloud 2020.0.0,但我找不到spring-cloud-starterspring-cloud-starter-awsspring-cloud-aws-messaging,这是哪里开始的?

如何将这些依赖项添加到我的项目中?

我需要在我的spring-boot项目中使用AwsS3Client

EN

回答 2

Stack Overflow用户

发布于 2021-01-04 17:37:34

您可以将以下依赖项包含到您的项目中,即pom.xml文件。

代码语言:javascript
复制
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-aws</artifactId>
    <version>2.2.5.RELEASE</version>
</dependency>


<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-aws-messaging</artifactId>
    <version>2.2.5.RELEASE</version>
</dependency>
票数 1
EN

Stack Overflow用户

发布于 2021-01-04 18:01:43

我假设您使用的是maven,如果是这样的话,您可以在pom.xml文件中添加以下内容;

代码语言:javascript
复制
<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-aws</artifactId>
                <version>2.2.5.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
<dependencies>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-aws</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-aws-messaging</artifactId>
    </dependency>
    <dependency> 
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>    <!-- test is optional, it is based on your requirements -->
</dependencies>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65560334

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档