-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: email 전송 api 변경 #205
base: develop
Are you sure you want to change the base?
Conversation
805e1d1
to
ff55e08
Compare
ff55e08
to
1afaab3
Compare
SonarCloud Quality Gate failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다-
Google SMTP 로 이메일 발송하는 코드를 제거하지 말고, AWS SES 장애일 때 Fallback 등으로 사용하면 어떨까요?
그리고 이메일 API 변경하고나서 이전과 성능이나 비용 등의 부분에서 어떤 차이가 있는지도 공유해주시면 좋을 것 같습니다.
module-api/build.gradle
Outdated
@@ -13,6 +13,7 @@ dependencies { | |||
implementation("io.springfox:springfox-swagger2:2.9.2") | |||
|
|||
implementation "com.amazonaws:aws-java-sdk-s3:${awsJavaSdkVersion}" | |||
implementation 'com.amazonaws:aws-java-sdk-ses:1.12.188' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
library 버전을 상수로 선언해서 사용하면 좋을 것 같습니다.
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class AwsSesConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
메일 발송은 배치나 어드민에서도 사용할 수 있는 기능이어서, domain 모듈에 추가되어도 좋을 것 같습니다.
@@ -23,5 +23,9 @@ cloud: | |||
s3: | |||
connection-timeout: 1000 | |||
request-timeout: 3000 | |||
ses: | |||
access-key: ENC(DB73NBzZBXtuco5qOP1/jtb+hE69JqfkbcuiM43tPG9sWNms0P+pqFaYc3gsAauMKMtI7Uz3JyOOIqztitWLcA==) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dev, prod 의 aws 계정이 각각 다른데 같은 키를 사용하나요? 환경별로 분리하는게 좋을 것 같아서요.
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class AwsSesService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
특정 벤더나 구현에 의존하는 구조보다는EmailService 등의 인터페이스를 선언하고, AwsSesService, GoogleSmtpService 등으로 각각의 구현체를 관리하는게 좋을 것 같습니다.
Kudos, SonarCloud Quality Gate passed! |
📌Linked Issues
✏Change Details
기존 : 5초 가량 소요
현재 : 0.5초 가량 소요
💬Comment
📑References
✅Check List