From 3581694d7ce9edda3e4f34203864c072ede99958 Mon Sep 17 00:00:00 2001 From: nnijgnus Date: Tue, 13 Aug 2024 11:21:11 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20s3Config=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/JGS/CasperEvent/global/config/S3Config.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Server/src/main/java/JGS/CasperEvent/global/config/S3Config.java b/Server/src/main/java/JGS/CasperEvent/global/config/S3Config.java index 39fba5fc..428ab1f4 100644 --- a/Server/src/main/java/JGS/CasperEvent/global/config/S3Config.java +++ b/Server/src/main/java/JGS/CasperEvent/global/config/S3Config.java @@ -2,6 +2,7 @@ import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.AmazonS3ClientBuilder; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; @@ -9,8 +10,12 @@ @Configuration @Profile("prod") public class S3Config { + @Value("${spring.cloud.aws.s3.region}") + private String region; @Bean public AmazonS3 amazonS3(){ - return AmazonS3ClientBuilder.defaultClient(); + return AmazonS3ClientBuilder.standard() + .withRegion(region) + .build(); } } \ No newline at end of file