Last active
May 13, 2018 09:18
-
-
Save LeoHeo/16d37c2143fd3062a05f82f0ac2a2b5c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compile group: 'com.amazonaws', name: 'aws-java-sdk-ses', version: "${awsSesVersion}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWS_ACCESS_KEY_ID: {AWS_ACCESS_KEY_ID} | |
AWS_SECRET_KEY: {AWS_SECRET_KEY} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.collect.config; | |
import com.amazonaws.auth.AWSStaticCredentialsProvider; | |
import com.amazonaws.auth.BasicAWSCredentials; | |
import com.amazonaws.regions.Regions; | |
import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceAsync; | |
import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceAsyncClient; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
/** | |
* @author Heo, Jin Han | |
* @since 2018-05-02 | |
*/ | |
@Configuration | |
public class AwsSesConfig { | |
@Value("${AWS_ACCESS_KEY_ID}") | |
private String AWS_ACCESS_KEY_ID; | |
@Value("${AWS_SECRET_KEY}") | |
private String AWS_SECRET_KEY; | |
@Bean | |
public AmazonSimpleEmailServiceAsync amazonSimpleEmailService() { | |
BasicAWSCredentials basicAWSCredentials = new BasicAWSCredentials(AWS_ACCESS_KEY_ID, AWS_SECRET_KEY); | |
return AmazonSimpleEmailServiceAsyncClient.asyncBuilder() | |
.withCredentials(new AWSStaticCredentialsProvider(basicAWSCredentials)) | |
.withRegion(Regions.US_WEST_2) | |
.build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
잘쓰겠습니다 (_ _)