쿠폰 시스템
- 쿠폰 생성 API 추가 - 쿠폰 리스트 API 추가
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package kr.co.vividnext.sodalive.configs
|
||||
|
||||
import com.amazonaws.auth.AWSStaticCredentialsProvider
|
||||
import com.amazonaws.auth.BasicAWSCredentials
|
||||
import com.amazonaws.services.sqs.AmazonSQS
|
||||
import com.amazonaws.services.sqs.AmazonSQSClientBuilder
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
class AmazonSQSConfig(
|
||||
@Value("\${cloud.aws.credentials.access-key}")
|
||||
private val accessKey: String,
|
||||
@Value("\${cloud.aws.credentials.secret-key}")
|
||||
private val secretKey: String,
|
||||
@Value("\${cloud.aws.region.static}")
|
||||
private val region: String
|
||||
) {
|
||||
@Bean
|
||||
fun amazonSQS(): AmazonSQS {
|
||||
val basicAWSCredentials = BasicAWSCredentials(accessKey, secretKey)
|
||||
val awsStaticCredentialsProvider = AWSStaticCredentialsProvider(basicAWSCredentials)
|
||||
|
||||
return AmazonSQSClientBuilder.standard()
|
||||
.withCredentials(awsStaticCredentialsProvider)
|
||||
.withRegion(region)
|
||||
.build()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user