Skip to content

Commit

Permalink
feat: s3Config 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
k000927 committed Aug 13, 2024
1 parent dde40bc commit 3581694
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@

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;

@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();
}
}

0 comments on commit 3581694

Please sign in to comment.