From 68a091000236109571c47d1f485f5f60a003b27f Mon Sep 17 00:00:00 2001 From: sebbbin Date: Sat, 9 Sep 2023 20:17:12 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[chore]=20s3=20=EC=9D=98=EC=A1=B4=EC=84=B1?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 413766b..3b12466 100644 --- a/build.gradle +++ b/build.gradle @@ -28,6 +28,7 @@ dependencies { developmentOnly 'org.springframework.boot:spring-boot-devtools' testImplementation 'org.springframework.boot:spring-boot-starter-test' + implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.1.RELEASE' // spring security implementation 'org.springframework.boot:spring-boot-starter-security' From 67646be0a9d8e624009c702da9aabc7fc71951de Mon Sep 17 00:00:00 2001 From: sebbbin Date: Sat, 9 Sep 2023 20:18:03 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[feat]=20aws=20sdk=20=EC=97=B0=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kusithm/hdmedi_server/HDmediServerApplication.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/kusithm/hdmedi_server/HDmediServerApplication.java b/src/main/java/com/kusithm/hdmedi_server/HDmediServerApplication.java index 8df45ff..13c9128 100644 --- a/src/main/java/com/kusithm/hdmedi_server/HDmediServerApplication.java +++ b/src/main/java/com/kusithm/hdmedi_server/HDmediServerApplication.java @@ -5,6 +5,10 @@ @SpringBootApplication public class HDmediServerApplication { + // aws sdk 연동 + static { + System.setProperty("com.amazonaws.sdk.disableEc2Metadata", "true"); + } public static void main(String[] args) { SpringApplication.run(HDmediServerApplication.class, args); From e9a5104017ebe6c14da5a1eaab83c52247faaec7 Mon Sep 17 00:00:00 2001 From: sebbbin Date: Sat, 9 Sep 2023 20:18:33 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[feat]=20aws=20s3=20=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EC=83=81=ED=83=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hdmedi_server/infra/smtp/s3/S3Config.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/main/java/com/kusithm/hdmedi_server/infra/smtp/s3/S3Config.java diff --git a/src/main/java/com/kusithm/hdmedi_server/infra/smtp/s3/S3Config.java b/src/main/java/com/kusithm/hdmedi_server/infra/smtp/s3/S3Config.java new file mode 100644 index 0000000..31ebb13 --- /dev/null +++ b/src/main/java/com/kusithm/hdmedi_server/infra/smtp/s3/S3Config.java @@ -0,0 +1,39 @@ +//package com.kusithm.hdmedi_server.infra.smtp.s3; +// +//import com.amazonaws.auth.AWSCredentials; +//import com.amazonaws.auth.AWSStaticCredentialsProvider; +//import com.amazonaws.auth.BasicAWSCredentials; +//import com.amazonaws.services.s3.AmazonS3; +//import com.amazonaws.services.s3.AmazonS3Client; +//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; +// +//@Configuration +//public class S3Config { +// // S3에 접근하는 AWS IAM 계정의 access key 입니다. +// @Value("${cloud.aws.credentials.access-key}") +// private String iamAccessKey; +// // S3에 접근하는 AWS IAM 계정의 secret key 입니다. +// @Value("${cloud.aws.credentials.secret-key}") +// private String iamSecretKey; +// // S3 서버가 위한 지역을 가져옵니다. +// @Value("${cloud.aws.region.static}") +// private String region; +// +// /** +// * S3에 접근 권한이 주워진 객체를 Spring Bean에 등록합니다. +// * param: none +// * return: S3에 접근 권한이 주워진 객체를 return 합니다. +// */ +// @Bean +// public AmazonS3Client amazonS3Client() { +// BasicAWSCredentials awsCredentials = new BasicAWSCredentials(iamAccessKey, iamSecretKey); +// return (AmazonS3Client) AmazonS3ClientBuilder.standard() +// .withRegion(region).enablePathStyleAccess() +// .withCredentials(new AWSStaticCredentialsProvider(awsCredentials)) +// .build(); +// } +//} +// From b51bccc39bd9a667dae807cc7486c8a2a399ab04 Mon Sep 17 00:00:00 2001 From: sebbbin Date: Sat, 9 Sep 2023 20:18:44 +0900 Subject: [PATCH 4/4] [feat] aws s3 provider --- .../com/kusithm/hdmedi_server/infra/smtp/s3/S3Provider.java | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/main/java/com/kusithm/hdmedi_server/infra/smtp/s3/S3Provider.java diff --git a/src/main/java/com/kusithm/hdmedi_server/infra/smtp/s3/S3Provider.java b/src/main/java/com/kusithm/hdmedi_server/infra/smtp/s3/S3Provider.java new file mode 100644 index 0000000..24e3be9 --- /dev/null +++ b/src/main/java/com/kusithm/hdmedi_server/infra/smtp/s3/S3Provider.java @@ -0,0 +1,4 @@ +package com.kusithm.hdmedi_server.infra.smtp.s3; + +public class S3Provider { +}