Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] RDS, S3 #13

Merged
merged 4 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
// }
//}
//
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.kusithm.hdmedi_server.infra.smtp.s3;

public class S3Provider {
}