Skip to content

Refactor/email notification#85

Merged
ramen0519 merged 2 commits intodevelopfrom
refactor/kakao-login
Feb 17, 2026
Merged

Refactor/email notification#85
ramen0519 merged 2 commits intodevelopfrom
refactor/kakao-login

Conversation

@ramen0519
Copy link
Copy Markdown
Contributor

@ramen0519 ramen0519 commented Feb 17, 2026

📍 PR 타입 (하나 이상 선택)

  • 기능 추가
  • 버그 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트
  • 기타 사소한 수정

❗️ 관련 이슈 링크

📌 개요

일일, 주간 알림 이메일 전송 활성화 ( 이메일 전송 주석 해제 )

🔁 변경 사항

notification 스케줄러 환경변수 적용 : 하드 코딩된 cron 환경 변수로 수정
이메일 알림 활성화 : Notification Service 이메일 알림 코드 주석 해제

📸 스크린샷

👀 기타 더 이야기해볼 점

✅ 체크 리스트

  • PR 템플릿에 맞추어 작성했어요.
  • 변경 내용에 대한 테스트를 진행했어요.
  • 프로그램이 정상적으로 동작해요.
  • PR에 적절한 라벨을 선택했어요.
  • 불필요한 코드는 삭제했어요.

Summary by CodeRabbit

  • New Features

    • 알림 스케줄러를 설정으로 활성화/비활성화할 수 있습니다.
    • 이메일 알림 기능이 활성화되었습니다.
  • Enhancements

    • 일일 및 주간 알림 일정을 설정으로 커스터마이징할 수 있습니다.
    • 알림 이메일의 사이트 URL을 설정으로 구성할 수 있습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 17, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

알림 스케줄러의 활성화를 동적으로 제어할 수 있도록 설정하고, 하드코딩된 스케줄 표현식과 사이트 URL을 외부 설정 속성으로 이동시켰습니다. 이메일 알림 기능을 활성화하고 주간 알림의 콘텐츠 생성 로직을 개선했습니다.

Changes

Cohort / File(s) Summary
스케줄러 설정 외부화
src/main/java/.../notification/application/usecase/NotificationScheduler.java, src/main/resources/application.yaml
@ConditionalOnProperty 어노테이션으로 스케줄러 활성화 제어 추가. 하드코딩된 cron 표현식(일일: 0 0 8 * * *, 주간: 0 0 9 * * MON)을 ${notification.scheduler.daily-cron}, ${notification.scheduler.weekly-cron} 속성 플레이스홀더로 교체.
이메일 알림 기능 활성화
src/main/java/.../notification/domain/service/NotificationService.java
주석 처리된 EmailService, NotificationTemplateBuilder 필드와 getEmailFromUser() 메서드 활성화. 주간 알림에서 불린 플래그 대신 quizCount, newsCount를 사용하는 이메일 콘텐츠 생성 로직으로 변경.
템플릿 URL 외부화
src/main/java/.../notification/infrastructure/template/NotificationTemplateBuilder.java, src/main/resources/application.yaml
하드코딩된 SITE_URL 상수 제거. @Value("${notification.site-url}") 어노테이션으로 주입받는 인스턴스 필드로 변경하여 런타임에 URL 설정 가능하게 개선.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes


검토 포인트

👍 좋은 부분:

  • 설정 외부화를 통해 배포 환경별로 쉽게 스케줄과 URL을 조정할 수 있게 개선했습니다.
  • @ConditionalOnProperty로 스케줄러를 유연하게 활성화/비활성화할 수 있어 운영 환경에서 매우 유용할 것 같습니다.

⚠️ 확인이 필요한 부분:

  1. application.yaml 들여쓰기: firebase adminsdk 섹션이 재정렬되었는데, YAML 파싱에 영향을 주지 않는지 확인 필요합니다. 다른 firebase 설정과 제대로 연결되는지 검증해주세요.

  2. 주간 알림 로직 변경: quizCountnewsCount 사용으로 변경되었는데, 이 값들이 실제로 데이터베이스에서 올바르게 집계되고 있는지 테스트 케이스로 검증하면 좋겠습니다.

  3. 기본값 확인: application.yaml의 cron 표현식 기본값이 원래의 일일 8시, 주간 월요일 9시와 정확히 일치하는지 재확인 바랍니다.

  4. 이메일 서비스 의존성: NotificationService 생성자에서 EmailServiceNotificationTemplateBuilder가 제대로 주입되는지, 설정이 누락되어 있지 않은지 확인해주세요.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/kakao-login

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ramen0519 ramen0519 changed the title Refactor/kakao login Refactor/email notification Feb 17, 2026
@ramen0519 ramen0519 merged commit 2e6dd03 into develop Feb 17, 2026
1 check was pending
@coderabbitai coderabbitai bot mentioned this pull request Feb 18, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant