小编yah*_*rad的帖子

Spring Cloud aws 设置端点

默认情况下,我使用 Spring Cloud AWS 连接到我在 openStack 中的 Amazon S3 端点是 s3.amasonaws.com 我想更改端点,因为我的存储桶 S3 我们在私有云中而不是在公共亚马逊云中。

 <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-aws</artifactId>
 </dependency>
Run Code Online (Sandbox Code Playgroud)

. . . .

<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>
Run Code Online (Sandbox Code Playgroud)

.... 在我的 application.properties 中

cloud.aws.stack.auto=false
cloud.aws.region.static=eu-west-3
storage.s3.accessKey=AKIAJNGI4VX4DTY4U24Q
Run Code Online (Sandbox Code Playgroud)

想你的帮助。

amazon-s3 amazon-web-services spring-boot spring-cloud-aws

5
推荐指数
1
解决办法
1550
查看次数