Skip to content

Commit

Permalink
S3 환경변수 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
ss7622 committed May 25, 2024
1 parent a4e223d commit 6e83900
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/example/fiurinee/S3Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class S3Controller {
private final AmazonS3 s3Client;
private final String bucketName;

public S3Controller(AmazonS3 s3Client, @Value("${cloud.aws.s3.bucket}") String bucketName) {
public S3Controller(AmazonS3 s3Client, @Value("${AWS_BUCKET}") String bucketName) {
this.s3Client = s3Client;
this.bucketName = bucketName;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/example/fiurinee/StorageConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
@Configuration
public class StorageConfig {

@Value("${cloud.aws.credentials.accessKey}")
@Value("${AWS_ACCESSKEY}")
private String accessKey;

@Value("${cloud.aws.credentials.secretKey}")
@Value("${AWS_SECRETKEY}")
private String accessSecret;
@Value("${cloud.aws.region.static}")
private String region;
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ logging.level:
cloud:
aws:
credentials:
accessKey: ${cloud.aws.credentials.accessKey}
secretKey: ${cloud.aws.credentials.secretKey}
accessKey: ${AWS_ACCESSKEY}
secretKey: ${AWS_SECRETKEY}
s3:
bucket: ${cloud.aws.s3.bucket}
bucket: ${AWS_BUCKET}
region:
static: ap-northeast-2
stack:
Expand Down

0 comments on commit 6e83900

Please sign in to comment.