Skip to content

Commit

Permalink
fix: 메일 서비스 비동기처리
Browse files Browse the repository at this point in the history
@async 에너테이션 추가
  • Loading branch information
jeong011010 committed Oct 29, 2024
1 parent 27398f9 commit 7dc24be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/com/sch/chekirout/ChekiroutApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableAsync;

@EnableJpaAuditing
@SpringBootApplication
@EnableAsync
public class ChekiroutApplication {

//브랜치 확인
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

Expand All @@ -27,7 +28,8 @@ public class EmailService {

private final EmailVerificationTokenRepository tokenRepository;
private final UserRepository userRepository;


@Async
public void sendVerificationEmail(String recipientEmail) {

String token = generateEmailVerificationToken(recipientEmail);
Expand Down

0 comments on commit 7dc24be

Please sign in to comment.