From 82eabaf49e66d751655d5d3fc56ca3582167e8f4 Mon Sep 17 00:00:00 2001 From: mingeun0507 Date: Sat, 20 Apr 2024 16:27:01 +0900 Subject: [PATCH 1/7] =?UTF-8?q?build:=20=EC=9D=B4=EB=A9=94=EC=9D=BC,=20Thy?= =?UTF-8?q?meleaf=20=EA=B4=80=EB=A0=A8=20=EC=9D=98=EC=A1=B4=EC=84=B1=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20(#173)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e928876..60b74d1 100644 --- a/build.gradle +++ b/build.gradle @@ -32,13 +32,15 @@ repositories { dependencies { // Spring Boot 의존성 - // JPA, Redis, Security, Validation, Web, Cache + // JPA, Redis, Security, Validation, Web, Cache, Mail, Thymeleaf implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-data-redis' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-cache' + implementation 'org.springframework.boot:spring-boot-starter-mail:3.1.2' + implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' // AWS S3, CloudWatch implementation 'io.awspring.cloud:spring-cloud-aws-s3:3.0.2' From 5ac43a61c2379071cda35f178b8f45befa80c4ec Mon Sep 17 00:00:00 2001 From: mingeun0507 Date: Sat, 20 Apr 2024 16:27:20 +0900 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=EC=9D=B4=EB=A9=94=EC=9D=BC=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20API=20=EB=B0=8F=20=EC=9D=B8=EC=A6=9D=20?= =?UTF-8?q?=EA=B3=BC=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../madii/common/exception/ErrorDetails.java | 3 ++ .../mail/application/MailSendService.java | 53 +++++++++++++++++++ .../MailVerificationCodeGenerator.java | 15 ++++++ .../mail/application/MailVerifyService.java | 25 +++++++++ .../mail/presentation/MailController.java | 42 +++++++++++++++ 5 files changed, 138 insertions(+) create mode 100644 src/main/java/com/guttery/madii/domain/mail/application/MailSendService.java create mode 100644 src/main/java/com/guttery/madii/domain/mail/application/MailVerificationCodeGenerator.java create mode 100644 src/main/java/com/guttery/madii/domain/mail/application/MailVerifyService.java create mode 100644 src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java diff --git a/src/main/java/com/guttery/madii/common/exception/ErrorDetails.java b/src/main/java/com/guttery/madii/common/exception/ErrorDetails.java index c46c23d..bb933ac 100644 --- a/src/main/java/com/guttery/madii/common/exception/ErrorDetails.java +++ b/src/main/java/com/guttery/madii/common/exception/ErrorDetails.java @@ -63,6 +63,9 @@ public enum ErrorDetails { FILE_UPLOAD_FAILED("F001", HttpStatus.INTERNAL_SERVER_ERROR.value(), "파일 업로드에 실패했습니다."), + MAIL_SEND_FAILED("M001", HttpStatus.INTERNAL_SERVER_ERROR.value(), "메일 전송 중 오류가 발생했습니다."), + MAIL_VERIFY_FAILED("M002", HttpStatus.BAD_REQUEST.value(), "이메일 인증에 실패했습니다."), + FIREBASE_INTEGRATION_FAILED("FI001", HttpStatus.INTERNAL_SERVER_ERROR.value(), "Firebase 연동 중 오류가 발생했습니다. 다시 시도해 주세요."), FIREBASE_NOTIFICATION_SEND_ERROR("FI002", HttpStatus.INTERNAL_SERVER_ERROR.value(), "Firebase 알림 전송 중 오류가 발생했습니다."), USER_TOKEN_INFORMATION_NOT_EXISTS("FI003", HttpStatus.NOT_FOUND.value(), "사용자의 토큰 정보가 존재하지 않습니다."), diff --git a/src/main/java/com/guttery/madii/domain/mail/application/MailSendService.java b/src/main/java/com/guttery/madii/domain/mail/application/MailSendService.java new file mode 100644 index 0000000..55101ff --- /dev/null +++ b/src/main/java/com/guttery/madii/domain/mail/application/MailSendService.java @@ -0,0 +1,53 @@ +package com.guttery.madii.domain.mail.application; + +import com.guttery.madii.common.exception.CustomException; +import com.guttery.madii.common.exception.ErrorDetails; +import jakarta.mail.MessagingException; +import jakarta.mail.internet.InternetAddress; +import jakarta.mail.internet.MimeMessage; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.stereotype.Service; +import org.thymeleaf.context.Context; +import org.thymeleaf.spring6.SpringTemplateEngine; + +import java.io.UnsupportedEncodingException; +import java.util.concurrent.TimeUnit; + +@RequiredArgsConstructor +@Slf4j +@Service +public class MailSendService { + private static final Long EXPIRE_TIME = 1000 * 60 * 3L + 1000 * 10; // 3분 10초 + + private final JavaMailSender javaMailSender; + private final SpringTemplateEngine springTemplateEngine; + private final RedisTemplate redisTemplate; + + public void sendSignUpMail(final String email) { + final String code = MailVerificationCodeGenerator.generate(); // 인증코드 생성 + final MimeMessage message = javaMailSender.createMimeMessage(); + + try { + message.addRecipients(MimeMessage.RecipientType.TO, email); // 보낼 이메일 설정 + message.setSubject("[MADII] 회원가입 인증번호 발송"); // 이메일 제목 + message.setText(setContext(code), "utf-8", "html"); // 내용 설정(Template Process) + message.setFrom(new InternetAddress("madii.service.cs@gmail.com", "마디")); + } catch (final MessagingException | UnsupportedEncodingException e) { + throw CustomException.of(ErrorDetails.MAIL_SEND_FAILED); + } + + redisTemplate.opsForValue().set(email, code, EXPIRE_TIME, TimeUnit.MILLISECONDS); // Redis에 인증코드 저장 + javaMailSender.send(message); // 이메일 전송 + } + + private String setContext(final String code) { // 타임리프 설정하는 코드 + final Context context = new Context(); + context.setVariable("code", code); // Template에 전달할 데이터 설정 + + return springTemplateEngine.process("mail", context); // mail.html + } + +} diff --git a/src/main/java/com/guttery/madii/domain/mail/application/MailVerificationCodeGenerator.java b/src/main/java/com/guttery/madii/domain/mail/application/MailVerificationCodeGenerator.java new file mode 100644 index 0000000..669cf72 --- /dev/null +++ b/src/main/java/com/guttery/madii/domain/mail/application/MailVerificationCodeGenerator.java @@ -0,0 +1,15 @@ +package com.guttery.madii.domain.mail.application; + +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.RandomUtils; + +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public class MailVerificationCodeGenerator { + private static final int CODE_LOWER_BOUND = 100000; + private static final int CODE_UPPER_BOUND = 1000000; + + public static String generate() { + return String.valueOf(RandomUtils.nextInt(CODE_LOWER_BOUND, CODE_UPPER_BOUND)); + } +} diff --git a/src/main/java/com/guttery/madii/domain/mail/application/MailVerifyService.java b/src/main/java/com/guttery/madii/domain/mail/application/MailVerifyService.java new file mode 100644 index 0000000..2099917 --- /dev/null +++ b/src/main/java/com/guttery/madii/domain/mail/application/MailVerifyService.java @@ -0,0 +1,25 @@ +package com.guttery.madii.domain.mail.application; + +import com.guttery.madii.common.exception.CustomException; +import com.guttery.madii.common.exception.ErrorDetails; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +@RequiredArgsConstructor +@Slf4j +@Service +public class MailVerifyService { + private final RedisTemplate redisTemplate; + + @Transactional(readOnly = true, propagation = Propagation.MANDATORY) + public void verifyEmail(final String email, final String code) { + final String redisCode = redisTemplate.opsForValue().get(email); + if (redisCode == null || !redisCode.equals(code)) { + throw CustomException.of(ErrorDetails.MAIL_VERIFY_FAILED); + } + } +} diff --git a/src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java b/src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java new file mode 100644 index 0000000..d139899 --- /dev/null +++ b/src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java @@ -0,0 +1,42 @@ +package com.guttery.madii.domain.mail.presentation; + +import com.guttery.madii.domain.mail.application.MailSendService; +import com.guttery.madii.domain.mail.application.MailVerifyService; +import jakarta.validation.constraints.NotBlank; +import lombok.RequiredArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RequiredArgsConstructor +@RestController +@RequestMapping("/mail") +@Validated +public class MailController { + private final MailSendService mailSendService; + private final MailVerifyService mailVerifyService; + + @GetMapping("/sign-up") + public void sendSignUpMail( + @NotBlank @RequestParam("email") final String email + ) { + mailSendService.sendSignUpMail(email); + } + + @GetMapping("/password-reset") + public void sendPasswordResetMail( + @NotBlank @RequestParam("email") final String email + ) { + mailSendService.sendSignUpMail(email); // TODO: 추후 수정 필요 + } + + @GetMapping("/verify") + public void verifyEmail( + @NotBlank @RequestParam("email") final String email, + @NotBlank @RequestParam("code") final String code + ) { + mailVerifyService.verifyEmail(email, code); + } +} From 8668995e0b608d5f4cdbbd35d5f24fbb9a112666 Mon Sep 17 00:00:00 2001 From: mingeun0507 Date: Sat, 20 Apr 2024 16:27:50 +0900 Subject: [PATCH 3/7] =?UTF-8?q?feat:=20=EC=9D=B4=EB=A9=94=EC=9D=BC=20?= =?UTF-8?q?=ED=85=9C=ED=94=8C=EB=A6=BF=20=EA=B5=AC=ED=98=84=20(#173)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/mail.html | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/main/resources/templates/mail.html diff --git a/src/main/resources/templates/mail.html b/src/main/resources/templates/mail.html new file mode 100644 index 0000000..2fd1f0a --- /dev/null +++ b/src/main/resources/templates/mail.html @@ -0,0 +1,36 @@ + + + + + + 회원가입 인증 + + + + + + +
+ + + + + +
+ +

+ 회원가입을 진심으로 환영합니다!

+

+ 안녕하세요. 마디입니다.
+ 아래의 인증코드 6자리를 입력하여 회원가입을 완료해주세요.
+ 만약 해당 이메일로 가입을 시도한 적이 없다면 madii.service.cs@gmail.com로 문의바랍니다. +

+ +
+

+
+
+ + From 08b4cf223e9ccc9c913ddd76dab3b826d72fcc62 Mon Sep 17 00:00:00 2001 From: mingeun0507 Date: Sat, 20 Apr 2024 16:27:01 +0900 Subject: [PATCH 4/7] =?UTF-8?q?build:=20=EC=9D=B4=EB=A9=94=EC=9D=BC,=20Thy?= =?UTF-8?q?meleaf=20=EA=B4=80=EB=A0=A8=20=EC=9D=98=EC=A1=B4=EC=84=B1=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20(#173)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e928876..60b74d1 100644 --- a/build.gradle +++ b/build.gradle @@ -32,13 +32,15 @@ repositories { dependencies { // Spring Boot 의존성 - // JPA, Redis, Security, Validation, Web, Cache + // JPA, Redis, Security, Validation, Web, Cache, Mail, Thymeleaf implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-data-redis' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-cache' + implementation 'org.springframework.boot:spring-boot-starter-mail:3.1.2' + implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' // AWS S3, CloudWatch implementation 'io.awspring.cloud:spring-cloud-aws-s3:3.0.2' From 1401868546dd82d11acfef81bec8bb82638e1cb8 Mon Sep 17 00:00:00 2001 From: mingeun0507 Date: Sat, 20 Apr 2024 16:27:20 +0900 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20=EC=9D=B4=EB=A9=94=EC=9D=BC=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20API=20=EB=B0=8F=20=EC=9D=B8=EC=A6=9D=20?= =?UTF-8?q?=EA=B3=BC=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../madii/common/exception/ErrorDetails.java | 3 ++ .../mail/application/MailSendService.java | 53 +++++++++++++++++++ .../MailVerificationCodeGenerator.java | 15 ++++++ .../mail/application/MailVerifyService.java | 25 +++++++++ .../mail/presentation/MailController.java | 42 +++++++++++++++ 5 files changed, 138 insertions(+) create mode 100644 src/main/java/com/guttery/madii/domain/mail/application/MailSendService.java create mode 100644 src/main/java/com/guttery/madii/domain/mail/application/MailVerificationCodeGenerator.java create mode 100644 src/main/java/com/guttery/madii/domain/mail/application/MailVerifyService.java create mode 100644 src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java diff --git a/src/main/java/com/guttery/madii/common/exception/ErrorDetails.java b/src/main/java/com/guttery/madii/common/exception/ErrorDetails.java index c46c23d..bb933ac 100644 --- a/src/main/java/com/guttery/madii/common/exception/ErrorDetails.java +++ b/src/main/java/com/guttery/madii/common/exception/ErrorDetails.java @@ -63,6 +63,9 @@ public enum ErrorDetails { FILE_UPLOAD_FAILED("F001", HttpStatus.INTERNAL_SERVER_ERROR.value(), "파일 업로드에 실패했습니다."), + MAIL_SEND_FAILED("M001", HttpStatus.INTERNAL_SERVER_ERROR.value(), "메일 전송 중 오류가 발생했습니다."), + MAIL_VERIFY_FAILED("M002", HttpStatus.BAD_REQUEST.value(), "이메일 인증에 실패했습니다."), + FIREBASE_INTEGRATION_FAILED("FI001", HttpStatus.INTERNAL_SERVER_ERROR.value(), "Firebase 연동 중 오류가 발생했습니다. 다시 시도해 주세요."), FIREBASE_NOTIFICATION_SEND_ERROR("FI002", HttpStatus.INTERNAL_SERVER_ERROR.value(), "Firebase 알림 전송 중 오류가 발생했습니다."), USER_TOKEN_INFORMATION_NOT_EXISTS("FI003", HttpStatus.NOT_FOUND.value(), "사용자의 토큰 정보가 존재하지 않습니다."), diff --git a/src/main/java/com/guttery/madii/domain/mail/application/MailSendService.java b/src/main/java/com/guttery/madii/domain/mail/application/MailSendService.java new file mode 100644 index 0000000..55101ff --- /dev/null +++ b/src/main/java/com/guttery/madii/domain/mail/application/MailSendService.java @@ -0,0 +1,53 @@ +package com.guttery.madii.domain.mail.application; + +import com.guttery.madii.common.exception.CustomException; +import com.guttery.madii.common.exception.ErrorDetails; +import jakarta.mail.MessagingException; +import jakarta.mail.internet.InternetAddress; +import jakarta.mail.internet.MimeMessage; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.stereotype.Service; +import org.thymeleaf.context.Context; +import org.thymeleaf.spring6.SpringTemplateEngine; + +import java.io.UnsupportedEncodingException; +import java.util.concurrent.TimeUnit; + +@RequiredArgsConstructor +@Slf4j +@Service +public class MailSendService { + private static final Long EXPIRE_TIME = 1000 * 60 * 3L + 1000 * 10; // 3분 10초 + + private final JavaMailSender javaMailSender; + private final SpringTemplateEngine springTemplateEngine; + private final RedisTemplate redisTemplate; + + public void sendSignUpMail(final String email) { + final String code = MailVerificationCodeGenerator.generate(); // 인증코드 생성 + final MimeMessage message = javaMailSender.createMimeMessage(); + + try { + message.addRecipients(MimeMessage.RecipientType.TO, email); // 보낼 이메일 설정 + message.setSubject("[MADII] 회원가입 인증번호 발송"); // 이메일 제목 + message.setText(setContext(code), "utf-8", "html"); // 내용 설정(Template Process) + message.setFrom(new InternetAddress("madii.service.cs@gmail.com", "마디")); + } catch (final MessagingException | UnsupportedEncodingException e) { + throw CustomException.of(ErrorDetails.MAIL_SEND_FAILED); + } + + redisTemplate.opsForValue().set(email, code, EXPIRE_TIME, TimeUnit.MILLISECONDS); // Redis에 인증코드 저장 + javaMailSender.send(message); // 이메일 전송 + } + + private String setContext(final String code) { // 타임리프 설정하는 코드 + final Context context = new Context(); + context.setVariable("code", code); // Template에 전달할 데이터 설정 + + return springTemplateEngine.process("mail", context); // mail.html + } + +} diff --git a/src/main/java/com/guttery/madii/domain/mail/application/MailVerificationCodeGenerator.java b/src/main/java/com/guttery/madii/domain/mail/application/MailVerificationCodeGenerator.java new file mode 100644 index 0000000..669cf72 --- /dev/null +++ b/src/main/java/com/guttery/madii/domain/mail/application/MailVerificationCodeGenerator.java @@ -0,0 +1,15 @@ +package com.guttery.madii.domain.mail.application; + +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.RandomUtils; + +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public class MailVerificationCodeGenerator { + private static final int CODE_LOWER_BOUND = 100000; + private static final int CODE_UPPER_BOUND = 1000000; + + public static String generate() { + return String.valueOf(RandomUtils.nextInt(CODE_LOWER_BOUND, CODE_UPPER_BOUND)); + } +} diff --git a/src/main/java/com/guttery/madii/domain/mail/application/MailVerifyService.java b/src/main/java/com/guttery/madii/domain/mail/application/MailVerifyService.java new file mode 100644 index 0000000..2099917 --- /dev/null +++ b/src/main/java/com/guttery/madii/domain/mail/application/MailVerifyService.java @@ -0,0 +1,25 @@ +package com.guttery.madii.domain.mail.application; + +import com.guttery.madii.common.exception.CustomException; +import com.guttery.madii.common.exception.ErrorDetails; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +@RequiredArgsConstructor +@Slf4j +@Service +public class MailVerifyService { + private final RedisTemplate redisTemplate; + + @Transactional(readOnly = true, propagation = Propagation.MANDATORY) + public void verifyEmail(final String email, final String code) { + final String redisCode = redisTemplate.opsForValue().get(email); + if (redisCode == null || !redisCode.equals(code)) { + throw CustomException.of(ErrorDetails.MAIL_VERIFY_FAILED); + } + } +} diff --git a/src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java b/src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java new file mode 100644 index 0000000..d139899 --- /dev/null +++ b/src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java @@ -0,0 +1,42 @@ +package com.guttery.madii.domain.mail.presentation; + +import com.guttery.madii.domain.mail.application.MailSendService; +import com.guttery.madii.domain.mail.application.MailVerifyService; +import jakarta.validation.constraints.NotBlank; +import lombok.RequiredArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RequiredArgsConstructor +@RestController +@RequestMapping("/mail") +@Validated +public class MailController { + private final MailSendService mailSendService; + private final MailVerifyService mailVerifyService; + + @GetMapping("/sign-up") + public void sendSignUpMail( + @NotBlank @RequestParam("email") final String email + ) { + mailSendService.sendSignUpMail(email); + } + + @GetMapping("/password-reset") + public void sendPasswordResetMail( + @NotBlank @RequestParam("email") final String email + ) { + mailSendService.sendSignUpMail(email); // TODO: 추후 수정 필요 + } + + @GetMapping("/verify") + public void verifyEmail( + @NotBlank @RequestParam("email") final String email, + @NotBlank @RequestParam("code") final String code + ) { + mailVerifyService.verifyEmail(email, code); + } +} From 7376b6c40ed026349a2ba8b4cb6c773c6e752505 Mon Sep 17 00:00:00 2001 From: mingeun0507 Date: Sat, 20 Apr 2024 16:27:50 +0900 Subject: [PATCH 6/7] =?UTF-8?q?feat:=20=EC=9D=B4=EB=A9=94=EC=9D=BC=20?= =?UTF-8?q?=ED=85=9C=ED=94=8C=EB=A6=BF=20=EA=B5=AC=ED=98=84=20(#173)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/mail.html | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/main/resources/templates/mail.html diff --git a/src/main/resources/templates/mail.html b/src/main/resources/templates/mail.html new file mode 100644 index 0000000..2fd1f0a --- /dev/null +++ b/src/main/resources/templates/mail.html @@ -0,0 +1,36 @@ + + + + + + 회원가입 인증 + + + + + + +
+ + + + + +
+ +

+ 회원가입을 진심으로 환영합니다!

+

+ 안녕하세요. 마디입니다.
+ 아래의 인증코드 6자리를 입력하여 회원가입을 완료해주세요.
+ 만약 해당 이메일로 가입을 시도한 적이 없다면 madii.service.cs@gmail.com로 문의바랍니다. +

+ +
+

+
+
+ + From 0f1460287aad576b75f8a1a97866595a89a18a07 Mon Sep 17 00:00:00 2001 From: mingeun0507 Date: Sat, 20 Apr 2024 16:30:06 +0900 Subject: [PATCH 7/7] =?UTF-8?q?fix:=20SemVer=EC=97=90=20=EB=A7=9E=EA=B2=8C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20(#173)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../madii/domain/mail/presentation/MailController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java b/src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java index d139899..3df0518 100644 --- a/src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java +++ b/src/main/java/com/guttery/madii/domain/mail/presentation/MailController.java @@ -18,21 +18,21 @@ public class MailController { private final MailSendService mailSendService; private final MailVerifyService mailVerifyService; - @GetMapping("/sign-up") + @GetMapping("/v1/sign-up") public void sendSignUpMail( @NotBlank @RequestParam("email") final String email ) { mailSendService.sendSignUpMail(email); } - @GetMapping("/password-reset") + @GetMapping("/v1/password-reset") public void sendPasswordResetMail( @NotBlank @RequestParam("email") final String email ) { mailSendService.sendSignUpMail(email); // TODO: 추후 수정 필요 } - @GetMapping("/verify") + @GetMapping("/v1/verify") public void verifyEmail( @NotBlank @RequestParam("email") final String email, @NotBlank @RequestParam("code") final String code