我使用Spring Cloud AWS来连接我的Amazon S3, 默认情况下,端点是s3.amasonaws.com。但是由于我的S3存储桶在私有云中而不是公共的亚马逊云中,所以我想更改端点。
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-aws</artifactId>
</dependency>
. . . .
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
在我的application.properties文件中
cloud.aws.stack.auto=false
cloud.aws.region.static=eu-west-3
storage.s3.accessKey=AKIAJNGI4VX4DTY4U24Q
感谢您的帮助。
谢谢您的协助。