Skip to content

Commit 7c55049

Browse files
jong-0126Ksr-ccbcoderabbitai[bot]crocusiaKimyoonbeom
authored
4차 배포 (#230)
* chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Revert "Create run-test.yaml" This reverts commit 3ca826f60d3c9d74264e2213b0837ef3a90e6414. * 도커에 레디스 설정파일 추가 (#7) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * chore: 도커 설정파일에 레디스 추가 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/6 카카오톡 소셜로그인 + jwt 토큰 발급 (#11) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * chore: 도커 설정파일에 레디스 추가 * feat: Jwt 토큰 로그인과 Oauth 기본설정 * fix: 오류수정 * fix: 생성자 누락값 수정 * fix: 생성자 누락값 수정 * chore: 코드정리 * feat: Oauth 구조 변경중.. * feat: 카카오톡 로그인 + jwt 생성 테스트 * feat: 레디스 설정추가 * chore: 코드 정리 * refactor: OAuth2LoginSuccessHandler 책임분리 * refactor: 필터에서 이중작업 정리 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/9 (#14) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * Revert "Create run-test.yaml" This reverts commit 3ca826f60d3c9d74264e2213b0837ef3a90e6414. * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * CI/CD AWS 연동 * CI/CD branches 범위 수정 --------- Co-authored-by: Ksr-ccb <harang4282@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/15 (#17) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * Revert "Create run-test.yaml" This reverts commit 3ca826f60d3c9d74264e2213b0837ef3a90e6414. * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * CI/CD AWS 연동 * CI/CD branches 범위 수정 * CI/CD AWS 연동 --------- Co-authored-by: Ksr-ccb <harang4282@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/8 (#19) * feat(build.gradle): validation 의존성 추가 * feat : CreateQuizDto 생성 * feat : QuizCategoryRepository 추가 * feat(QuizService) : json 파일 데이터 Quiz 엔티티로 변환 후 저장 기능 추가 * feat : QuizCategory 예외 코드 추가 * feat : uploadQuizJson에 예외 코드 사용' 추가 * feat(QuizController) : quiz 업로드 api 추가 * feat(QuizController) : QuizService의 uploadQuizJson 연동 * Ignore application-local.properties * feat : 카테고리 타입 생성 api 추가 * refactor(QuizCategoryService) : 메서드 isPresent로 변경 * refactor : 코드래빗 피드백 기반 누락 및 오타 수정 * docker-compose.yml 케시 삭제 * feat: OAuth2 Github 기능추가 및 임시 메인페이지 추가 (#21) * chore: AuthUser, Role 클래스 global.dto 패키지로 이동 * chore: OAuth 패키지 이름 변경 * chore: 주석 및 띄어쓰기 수정 * feat: OAuth2 응답객체 생성 및 수정 * refactor: OAuth2 서비스 로직 리팩토링 * chore: 임시 랜딩페이지 추가 * chore: Role 클래스를 user.entity 패키지로 이동 * refactor: 소셜정보 가져올 때, 예외처리 추가 * Feat/15 (#18) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * Revert "Create run-test.yaml" This reverts commit 3ca826f60d3c9d74264e2213b0837ef3a90e6414. * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * CI/CD AWS 연동 * CI/CD branches 범위 수정 * CI/CD AWS 연동 * CI/CD AWS 연동 * CI/CD AWS 연동 * 수정 * commit * 환경변수로 수정 * commit * deploy.yml 수정 * commit * deploy 수정 --------- Co-authored-by: Ksr-ccb <harang4282@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/10 (#23) * feat: Ai, 서비스 구현 및 Config 추가. 서비스와 빈 생성을 위한 해당 Config 추가. * feat:AiService * refactor: Ai, 서비스 및 컨트롤러 코드 수정. 작성했던 API 명세서에 맞추어 기능 및 동작 수정. * temp : commit for merge * feat: AI, 테스트코드 구현1. * refactor: aiService subscriptionId 반영 --------- Co-authored-by: Kimyoonbeom <kimybeom@naver.com> Co-authored-by: ChoiHyuk <wannabeing@naver.com> * Feat/13 구독 엔티티 구조 정리 및 구독 정보 조회 (#28) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * chore: 패키지 구조 정리 * feat: 요일->int, int->요일 바꾸기 * feat: 요일->int, int->요일 바꾸기 * chore: docker-compose.yml gitignore 추가 * temp: temp commit for pull * temp: temp commit for pull * feat: 구독 엔티티 구조 변경 및 구독 정보 조회 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/27 (#29) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * Revert "Create run-test.yaml" This reverts commit 3ca826f60d3c9d74264e2213b0837ef3a90e6414. * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * CI/CD AWS 연동 * CI/CD branches 범위 수정 * CI/CD AWS 연동 * CI/CD AWS 연동 * CI/CD AWS 연동 * 수정 * commit * 환경변수로 수정 * commit * deploy.yml 수정 * commit * deploy 수정 * commit * properties 중요정보 환경변수 처리 --------- Co-authored-by: Ksr-ccb <harang4282@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/27 (#30) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * Revert "Create run-test.yaml" This reverts commit 3ca826f60d3c9d74264e2213b0837ef3a90e6414. * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * CI/CD AWS 연동 * CI/CD branches 범위 수정 * CI/CD AWS 연동 * CI/CD AWS 연동 * CI/CD AWS 연동 * 수정 * commit * 환경변수로 수정 * commit * deploy.yml 수정 * commit * deploy 수정 * commit * properties 중요정보 환경변수 처리 * deploy 파일 환경 변수 export --------- Co-authored-by: Ksr-ccb <harang4282@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Fix logging and import issues (#32) * feat: 구독정보/구독내역 생성/수정 로직 추가 및 공통응답 수정 (#33) * chore: 필요없는 어노테이션 삭제 * chore: 공통응답 DTO 수정 - `@RequiredArgsConstructor`는 빌더를 사용한다면 추후 삭제해야 함 * feat: 구독/구독로그 예외처리 추가 및 수정 * feat: 구독기간 enum 클래스 추가 * chore: 구독로그 엔티티에 누락된 컬럼 추가 및 생성자 수정 * refactor: 구독생성자 수정 및 업데이트메서드 추가 * feat: 구독(Subscription) 생성/수정 로직 추가 - SubscriptionLog도 함께 생성되게 추가 * chore: QuizCategory 엔티티에 Getter 추가 * chore: 공통응답 DTO 빌더 삭제 * refactor: 구독로그 테이블명 변경 → 구독내역(SubscriptionHistory) * refactor: 구독테이블에 N+1(QuizCategory) 문제 수정 문제카테고리(QuizCategory)의 경우, 구독내역이 생성될 때마다 쿼리가 중복되어 발생할 수있다고 판단되어 미리 FetchJoin 설정 * feat: 구독 취소 로직 추가 * refactor: QuizCategory 는 생성하는 것이 아닌 조회하는 방식으로 로직 수정 * chore: 예외처리 간단 수정 * refactor: 이메일 동시성문제를 유니크제약조건과 try-catch로 방지 * chore: 엔티티 수정시간과 시간이 다를 수 있기 때문에 엔티티자체의 수정시간을 사용하도록 변경 * chore: QuizCategoryRepository 알맞는 메서드명으로 변경 * chore: 날짜계산을 Days가 아닌 Month로 변경 `plusMonths()` 함수 사용 * Feat/13 로그인 마이페이지 (#35) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * chore: 패키지 구조 정리 * feat: 요일->int, int->요일 바꾸기 * feat: 요일->int, int->요일 바꾸기 * chore: docker-compose.yml gitignore 추가 * temp: temp commit for pull * temp: temp commit for pull * feat: 구독 엔티티 구조 변경 및 구독 정보 조회 * fix: 충돌수정 및 변수형 일치문제 해결 * feat: 구독취소, 회원탈퇴 * chore: 각 api별 권한 추가 (계속 추가되어야함) * chore: Quiz_category Enum 삭제 * feat: 로그인 회원 마이페이지 확인 (구독로그 포함) * feat: 구독 비활성화, (임시) 업데이트 * test: 구독 조회 비활성화(로그생성은 아직x) 테스트코드, 로그인 마이페이지 기본기능 테스트 기능 * test: 테스트코드수정 * chore: Quiz_category Enum 삭제 후처리 * chore: Dto 이름 수정 및 파일정리 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/22 인증 코드 이메일 발급 및 검증 (#36) * feat : 이메일 발송을 위한 SMTP 관련 의존성 추가 * feat : 유연성 및 확장성을 위해 MailConfig 추가 * feat : MimeMessage 기반 Html형식 메일 전송 메서드 추가 * feat(UserService) : 인증 코드 생성 * feat : VerificationCode 서비스, 예외 추가 * feat : 인증코드 검증 성공 시, 인증코드 삭제 기능 추가 * feat : 인증 코드 발급 Controller 클래스 추가 * feat : 인증 코드 발송 기능 추가 * refactor : verify 메서드 반환타입 void로 변경 * feat : 인증 코드 관련 api jwt 검증 제외 설정 * fix : 변경된 에러 코드로 인한 실행 오류 수정 * feat : 피드백 기반 수정 * feat : 인증코드 검증 시도 횟수 추가 * refactor : MailConfig 위치 변경 * Feat/31 (#40) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * Revert "Create run-test.yaml" This reverts commit 3ca826f60d3c9d74264e2213b0837ef3a90e6414. * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * CI/CD AWS 연동 * CI/CD branches 범위 수정 * CI/CD AWS 연동 * CI/CD AWS 연동 * CI/CD AWS 연동 * 수정 * commit * 환경변수로 수정 * commit * deploy.yml 수정 * commit * deploy 수정 * commit * properties 중요정보 환경변수 처리 * deploy 파일 환경 변수 export * 도커 추가하여 배포 * commit * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * commit * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 --------- Co-authored-by: Ksr-ccb <harang4282@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/41 (#42) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * Revert "Create run-test.yaml" This reverts commit 3ca826f60d3c9d74264e2213b0837ef3a90e6414. * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * CI/CD AWS 연동 * CI/CD branches 범위 수정 * CI/CD AWS 연동 * CI/CD AWS 연동 * CI/CD AWS 연동 * 수정 * commit * 환경변수로 수정 * commit * deploy.yml 수정 * commit * deploy 수정 * commit * properties 중요정보 환경변수 처리 * deploy 파일 환경 변수 export * 도커 추가하여 배포 * commit * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * commit * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 --------- Co-authored-by: Ksr-ccb <harang4282@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/41 (#43) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * Revert "Create run-test.yaml" This reverts commit 3ca826f60d3c9d74264e2213b0837ef3a90e6414. * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * ADD workflow * CI/CD AWS 연동 * CI/CD branches 범위 수정 * CI/CD AWS 연동 * CI/CD AWS 연동 * CI/CD AWS 연동 * 수정 * commit * 환경변수로 수정 * commit * deploy.yml 수정 * commit * deploy 수정 * commit * properties 중요정보 환경변수 처리 * deploy 파일 환경 변수 export * 도커 추가하여 배포 * commit * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * commit * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 * 도커 추가하여 배포 --------- Co-authored-by: Ksr-ccb <harang4282@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/39 AI, RAG 및 Chroma 연동 중간 커밋 (#45) * temp : commit for merge * feat: chroma 연동, RAG 구조 구현 그에 따른 AiService 파일 수정. * refactor: chroma 연동, RAG 구조 구현 수정. * Feat: OAuth2 Naver 로그인 기능 추가 및 관련 코드 수정 (#48) * build: mysql-connector 버전 업데이트 보안 이슈로 버전 업데이트 * refactor: OAuth2 예외 처리 수정 및 생성 UserException에서 분리했음 * chore: OAuth2 카카오 응답객체 예외처리 수정 * fix: OAuth2 Github 로그인 시, 이메일 누락 방지 로직 추가 accessToken 활용하여 이메일 가져오기 * feat: OAuth2 네이버 로그인 기능 추가 공통 유틸메서드를 제공하기 위해 추상클래스 생성 * chore: OAuth2 추상클래스 적용 * chore: OAuth2 데이터(attributes) 파싱 예외처리 코드 추가 * chore: OAuth2Service를 OAuth2 패키지로 이동 및 패키지명 수정 사용하지 않는 Controller, Service, Repository 삭제 * chore: 간단 로직 수정 * Feat/12 오늘의 문제 뽑아주기 & 하루에 한번씩 돌아가는 문제 정답률 계산 (#44) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * feat: 문제 추천1 차 * feat: 각 문제별 정답률 계산, 유저 개인의 정답률 계산 * feat: 문제를 내어주는 두가지 방법 * - getTodayQuiz -> getTodayQuizNew (O) - getTodayQuizNew -> getTodayQuiz (X) 둘중에 하나씩만 쓰거나 getTodayQuiz -> getTodayQuizNew 해야함 리턴값은 지금 api 형식으로 만든다고 QuizDto 인데, Quiz로 바꿔서 줄 수 있음 * feat: 문제를 내어주는 두가지 방법 * - getTodayQuiz -> getTodayQuizNew (O) - getTodayQuizNew -> getTodayQuiz (X) 둘중에 하나씩만 쓰거나 getTodayQuiz -> getTodayQuizNew 해야함 리턴값은 지금 api 형식으로 만든다고 QuizDto 인데, Quiz로 바꿔서 줄 수 있음 * test: 문제를 내어주는 두가지 방법 테스트코드 * fix: 포특밧 되돌려줌 * refactor: 정답률 포멧 스케일 통일화 * fix: 오류검증 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * chore/50 도커 컴포즈 파일 변경 (#52) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * chore: 도커 볼륨 구조 변경 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/49 github md파일 크롤링 기능 추가 (#53) * feat : 깃허브 url Parser 추가 * feat : 크롤링 기능 추가 * feat : 프로젝트 내에 저장 기능 추가 * feat : 크롤링한 파일을 프로젝트 폴더 내에 저장하는 기능 추가 * chore : chroma 설정 주석 해제 * feat : 컨트롤러 추가 * feat : VectorStore에 저장 메서드 추가 * refactor : List<Document> 전역변수에서 지역변수로 변경 * feat : CrawlerController 예외 추가 * feat: 답안 체점 로직 구현 (#55) test: - 정상 체점 후 데이터 저장 - 구독 정보 없는 경우 예외 처리 - 퀴즈 정보 없는 경우 예외 처리 * Feat/38 문제풀이 링크 이메일 발송 및 테스트 코드 (#56) * feat : 문제 발송용 이메일 sender 임시 생성 * feat : today-quiz.html 추가 * feat : 문제 발송 부분 추가 * feat : 수정사항 없음 * feat : 문제 선택 후, 이메일 발송 기능 추가 * feat : 문제 선정 후 발송하는 issueTodayQuiz 추가 * feat : 문제 발송 메일 로그 남기기 * feat : MailLogResponseDto 생성 * refactor : 변경에 따른 issueTodayQuiz 수정 * feat : 간단한 테스트 코드 추가 * feat : 이메일 발송 성공, 실패 테스트 케이스 추가 * feat : 동기일 때의 성능 측정 테스트 코드 추가 * feat : 속도 성능 테스트 추가 * Chore/54 중간 테스트, 필요한 예외처리 및 모니터링 도구 설치(그라파나, 프로메테우스) (#59) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * chore: 도커 볼륨 구조 변경 * chore: 실행오류 수정, 글로벌 오류 핸들링 경우의 수 추가 * fix: 구독 생성, 수정시 ModelAttribute 사용되게 변경 * refactor: 필요없는 함수삭제, url 정정 * refactor: dto에 카테고리 객체 반환하지 않도록 수정 * feat: jwt 리프래시 토큰 기반 로그인연장, 로그아웃 * chore: jwt 토큰 오류 반환하도록 설정 * fix: jwt 토큰 오류시 로그인 html 출력안되도록 설정 * fix: SecurityConfig 단에서 인증인가 오류 개선 * refactor: SecurityConfig 구조 변경 * refactor: 그라파나, 프로메테우스 적용, 로그인페이지 임시 제작 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * feat : 메일 발송 api 추가 (#63) * Feat/58 문제, 정답, 해설 조회 기능 구현 (#64) * feat: 답안 체점 로직 구현 test: - 정상 체점 후 데이터 저장 - 구독 정보 없는 경우 예외 처리 - 퀴즈 정보 없는 경우 예외 처리 * feat: 문제, 정답, 해설 조회 기능 구현 test: - 정상 조회 확인 - 퀴즈 없는 경우 예외처리 * feat: 문제, 정답, 해설 조회 기능 구현 test: - 정상 조회 확인 - 퀴즈 없는 경우 예외처리 * feat/39 RAG 구조 완성 및 서비스 컨트롤러 리팩토링. (#66) * temp : commit for merge * feat: chroma 연동, RAG 구조 구현 그에 따른 AiService 파일 수정. * refactor: chroma 연동, RAG 구조 구현 수정. * feat: 깃허브 document 생성을 위한 RagService 수정. * feat: 깃허브 document 생성을 위한 RagService 수정. * refactor: 경로 인코딩, API 호출 URL, 예외 발생 여부 확인을 위한 로그 추가. * refactor: 깃허브 크롤링, 로그 추가 및 파싱 방식 수정. * refactor: RagService의 세부 수치의 조정. * refactor: test코드 추가 수정. * Feat/62 문제 확인 페이지 생성 (#67) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * feat: 퀴즈 페이지 * feat: 퀴즈 페이지 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/SpringBatch (with Jenkins) 적용 (#70) * build: SpringBatch 설치 및 QueryDsl 버전 설정 * feat: Docker-Compose에 Jenkins 설정 * feat: SpringBatch 데일리 메일 전송 Job 설정 * Feat/71 (#73) * feat: 답안 체점 로직 구현 test: - 정상 체점 후 데이터 저장 - 구독 정보 없는 경우 예외 처리 - 퀴즈 정보 없는 경우 예외 처리 * feat: 문제, 정답, 해설 조회 기능 구현 test: - 정상 조회 확인 - 퀴즈 없는 경우 예외처리 * feat: 문제, 정답, 해설 조회 기능 구현 test: - 정상 조회 확인 - 퀴즈 없는 경우 예외처리 * feat: 퀴즈 정답 선택률 조회 기능 구현 test: - 정상 조회 확인 * Feat/57 이메일 발송 MQ + 비동기 처리 추가 (#72) * feat : Redis Streams 기반 메시지 큐 패턴 적용 * feat : 스프링 배치에 추가 * feat : 테스트 코드 추가 * refactor : 테스트 코드 실행 확인 완료 * refactor : 메일 로그 저장하는 aop 적용 * feat : 발송 실패한 메일 처리하는 큐 추가 * feat : Step 실행 logger 추가 * feat : 속도 성능 테스트 추가 * chore : 테스트 코드 메일 주소 변경 * chore : 테스트 코드 링크 변경 * Fix/프론트엔드 연동을 위한 최소한의 작업 (#75) * build: SpringBatch 설치 및 QueryDsl 버전 설정 * feat: Docker-Compose에 Jenkins 설정 * feat: SpringBatch 데일리 메일 전송 Job 설정 * feat: QuizCategory 조회 API 생성 * chore: 프론트단 데이터 받아오는 형식 JSON으로 변경 * chore: 이미구독중인지 확인하는 메서드 추가 * feat: 이메일 템플릿 추가 * chore: MYSQL 포트 3306 변경 * refactor : 변경된 html과 연동 --------- Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> * fix : 예외처리를 위한 조건문 추가 (#79) * Feat/76 (#80) * feat: 답안 체점 로직 구현 test: - 정상 체점 후 데이터 저장 - 구독 정보 없는 경우 예외 처리 - 퀴즈 정보 없는 경우 예외 처리 * feat: 문제, 정답, 해설 조회 기능 구현 test: - 정상 조회 확인 - 퀴즈 없는 경우 예외처리 * feat: 문제, 정답, 해설 조회 기능 구현 test: - 정상 조회 확인 - 퀴즈 없는 경우 예외처리 * feat: 퀴즈 정답 선택률 조회 기능 구현 test: - 정상 조회 확인 * feat: 퀴즈 정답 선택률 조회 기능 구현 test: - 정상 조회 확인 * refactor: - 도커 컴포즈 mysql 포트 3306 변경 - 레디스 버전 7.2로 변경 - mail test code 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * 도커 컴포즈 수정 * chore: forward-header 전략 설정 (#81) OAuth2 인증을 위한 설정 * 1차 배포 * 1차 배포 * 1차 병합 (#83) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. --------- Co-authored-by: Ksr-ccb <harang4282@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * fix: aiFeedback 컬럼 데이터길이 수정 (#88) * Chore: 메일서비스 링크 도메인 변경 (#89) * chore: 엔티티수정 * fix: 테스트코드 오류수정 * fix: 테스트코드 오류수정 * fix: 메일 서비스 도메인 수정 * Refactor/78 : 문제풀이 링크 발송 흐름 일부 수정, 성능 개선 1차 (#90) * chore : 테스트용 Job 주석 제거 및 용도별 Job 분리 * chore : batch 커스텀 컴포넌트 패키지 변경 * refactor : processor에 유효성 검증, 문제 출제 추가 * refactor : 문제 출제 위치 변경 * doc : 로그 주석 처리 * chore : 테스트 코드 주석처리 * feat : 테스트용 api 추가 * fix/78 : BatchService Bean 주입 오류 개선 (#93) * fix : BatchService에서 Qualifier 적용을 위해 직접 생성자 작성 * Feat/68 프롬프팅 적용 방식 리팩토링 및 RAG 문서분류성능평가 테스트 코드 작성 (#94) * temp : commit for merge * feat: chroma 연동, RAG 구조 구현 그에 따른 AiService 파일 수정. * refactor: chroma 연동, RAG 구조 구현 수정. * feat: 깃허브 document 생성을 위한 RagService 수정. * feat: 깃허브 document 생성을 위한 RagService 수정. * refactor: answerId 기반 AI 피드백 조회 로직으로 변경 * refactor: 프롬프트 하드코딩 제거 및 YAML 기반 구성 적용 * feat: 크로마 벡터 DB 문서 적재 후 원격 공유 가능하게함 * 변경 사항 저장용 * refactor: 문서 기반 서비스 테스트 리팩토링 * 1차 배포 (#86) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * 도커에 레디스 설정파일 추가 (#7) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * chore: 도커 설정파일에 레디스 추가 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/6 카카오톡 소셜로그인 + jwt 토큰 발급 (#11) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `src/main/java/com/example/cs25/domain/ai/exception/AiException.java` * `src/main/java/com/example/cs25/domain/mail/entity/MailLog.java` * `src/main/java/com/example/cs25/domain/mail/exception/MailException.java` * `src/main/java/com/example/cs25/domain/oauth/exception/OauthException.java` * `src/main/java/com/example/cs25/domain/quiz/exception/QuizException.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/entity/UserQuizAnswer.java` * `src/main/java/com/example/cs25/domain/userQuizAnswer/exception/UserQuizAnswerException.java` * `src/main/java/com/example/cs25/domain/users/entity/User.java` * `src/main/java/com/example/cs25/domain/users/exception/UserException.java` * `src/main/java/com/example/cs25/domain/users/vo/Subscription.java` * `src/main/java/com/example/cs25/global/exception/BaseException.java` * `src/main/java/com/example/cs25/global/exception/GlobalExceptionHandler.java` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Create run-test.yaml * Create PULL_REQUEST_TEMPLATE.md * refactor: ERD 수정으로 인한 Entity 수정 (#4) * refactor: ERD 수정으로 인한 Entity 수정. * refactor: ERD 수정으로 인한 Entity 수정2. * chore: 도커 설정파일에 레디스 추가 * feat: Jwt 토큰 로그인과 Oauth 기본설정 * fix: 오류수정 * fix: 생성자 누락값 수정 * fix: 생성자 누락값 수정 * chore: 코드정리 * feat: Oauth 구조 변경중.. * feat: 카카오톡 로그인 + jwt 생성 테스트 * feat: 레디스 설정추가 * chore: 코드 정리 * refactor: OAuth2LoginSuccessHandler 책임분리 * refactor: 필터에서 이중작업 정리 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Baek jonghyun <69610809+jong-0126@users.noreply.github.com> Co-authored-by: crocusia <132359536+crocusia@users.noreply.github.com> Co-authored-by: Kimyoonbeom <101162650+Kimyoonbeom@users.noreply.github.com> * Feat/9 (#14) * chore : initialize project structure (#2) * chore: initialize project structure * chore: initialize project structure * chore: initialize project structure * fix: 엔티티 오류수정 및 설정파일 오류 수정 * 📝 Add docstrings to `dev` (#3) Docstrings generation was requested by @Ksr-ccb. * https://github.com/NBC-finalProject/CS25/pull/2#issuecomment-2914743195 The following files were modified: * `sr…
1 parent c05ef55 commit 7c55049

30 files changed

Lines changed: 1705 additions & 147 deletions

cs25-batch/src/main/java/com/example/cs25batch/batch/service/JavaMailService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public void sendQuizEmail(Subscription subscription, Quiz quiz) {
3131
context.setVariable("toEmail", subscription.getEmail());
3232
context.setVariable("question", quiz.getQuestion());
3333
context.setVariable("quizLink", MailLinkGenerator.generateQuizLink(subscription.getSerialId(), quiz.getSerialId()));
34+
context.setVariable("subscriptionSettings", MailLinkGenerator.generateSubscriptionSettings(subscription.getSerialId()));
3435
String htmlContent = templateEngine.process("mail-template", context);
3536

3637
MimeMessage message = mailSender.createMimeMessage();

cs25-batch/src/main/resources/templates/mail-template.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
<!-- Logo and Title in horizontal layout -->
2222
<table cellpadding="0" cellspacing="0" border="0">
2323
<tr>
24-
<td style="vertical-align: middle; padding-right: 12px;">
25-
<img src="cs25.png" alt="CS25" style="width: 28px; height: 28px;">
26-
</td>
24+
<!-- <td style="vertical-align: middle; padding-right: 12px;">-->
25+
<!-- <img src="cs25.png" alt="CS25" style="width: 28px; height: 28px;">-->
26+
<!-- </td>-->
2727
<td style="vertical-align: middle;">
2828
<h2 style="font-size: 20px; font-weight: 600; margin: 0; color: #1d4ed8;">오늘의 문제</h2>
2929
</td>
@@ -39,7 +39,7 @@ <h2 style="font-size: 20px; font-weight: 600; margin: 0; color: #1d4ed8;">오늘
3939
<!-- Question Box -->
4040
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin: 40px 0;">
4141
<tr>
42-
<td style="color: white; font-weight: 700; font-size: 28px; line-height: 1.6; margin: 0; text-align: center;">
42+
<td style="color: white; font-weight: 700; font-size: 24px; line-height: 1.6; margin: 0; text-align: center;">
4343
<span th:text="${question}">관계 대수에 대한 설명으로 틀린 것은?</span>
4444
</td>
4545
</tr>

cs25-service/src/main/java/com/example/cs25service/domain/ai/service/AiFeedbackQueueService.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
public class AiFeedbackQueueService {
1717

1818
public static final String DEDUPLICATION_SET_KEY = "ai-feedback-dedup-set";
19+
1920
private final EmitterRegistry emitterRegistry;
2021
private final RedisTemplate<String, Object> redisTemplate;
2122

22-
public void enqueue(Long answerId, SseEmitter emitter, String mode) {
23+
public void enqueue(Long answerId, SseEmitter emitter) {
2324
try {
24-
// Redis Set을 통한 중복 체크
25+
// Redis Set을 통한 중복 처리 방지
2526
Long added = redisTemplate.opsForSet()
2627
.add(DEDUPLICATION_SET_KEY, String.valueOf(answerId));
2728
if (added == null || added == 0) {
@@ -34,14 +35,16 @@ public void enqueue(Long answerId, SseEmitter emitter, String mode) {
3435

3536
Map<String, Object> message = new HashMap<>();
3637
message.put("answerId", answerId);
37-
message.put("mode", mode); // word/sentence 모드 구분 추가
3838

3939
redisTemplate.opsForStream().add(RedisStreamConfig.STREAM_KEY, message);
4040

4141
} catch (Exception e) {
42+
log.error("Enqueue failed for answerId {}: {}", answerId, e.getMessage(), e);
43+
44+
// 롤백: emitterRegistry/Redis Set에서 제거
4245
emitterRegistry.remove(answerId);
43-
redisTemplate.opsForSet()
44-
.remove(DEDUPLICATION_SET_KEY, String.valueOf(answerId)); // 실패 시 롤백
46+
redisTemplate.opsForSet().remove(DEDUPLICATION_SET_KEY, String.valueOf(answerId));
47+
4548
completeWithError(emitter, e);
4649
}
4750
}
Lines changed: 37 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
package com.example.cs25service.domain.ai.service;
22

3-
import com.example.cs25entity.domain.quiz.entity.Quiz;
43
import com.example.cs25entity.domain.user.entity.User;
54
import com.example.cs25entity.domain.user.repository.UserRepository;
6-
import com.example.cs25entity.domain.userQuizAnswer.entity.UserQuizAnswer;
75
import com.example.cs25entity.domain.userQuizAnswer.repository.UserQuizAnswerRepository;
86
import com.example.cs25service.domain.ai.client.AiChatClient;
97
import com.example.cs25service.domain.ai.exception.AiException;
108
import com.example.cs25service.domain.ai.exception.AiExceptionCode;
119
import com.example.cs25service.domain.ai.prompt.AiPromptProvider;
1210
import java.io.IOException;
1311
import lombok.RequiredArgsConstructor;
12+
import lombok.extern.slf4j.Slf4j;
1413
import org.springframework.stereotype.Component;
1514
import org.springframework.transaction.annotation.Transactional;
1615
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
1716

17+
@Slf4j
1818
@Component
1919
@RequiredArgsConstructor
2020
public class AiFeedbackStreamProcessor {
@@ -26,44 +26,14 @@ public class AiFeedbackStreamProcessor {
2626
private final AiChatClient aiChatClient;
2727

2828
@Transactional
29-
public void streamWord(Long answerId, SseEmitter emitter) {
29+
public void stream(Long answerId, SseEmitter emitter) {
3030
try {
31-
var answer = prepare(answerId, emitter);
32-
if (answer == null) {
33-
return;
34-
}
35-
36-
var quiz = answer.getQuiz();
37-
var docs = ragService.searchRelevant(quiz.getQuestion(), 3, 0.3);
38-
String userPrompt = promptProvider.getFeedbackUser(quiz, answer, docs);
39-
String systemPrompt = promptProvider.getFeedbackSystem();
40-
41-
send(emitter, "AI 응답 대기 중...");
42-
43-
StringBuilder wordBuffer = new StringBuilder();
44-
45-
aiChatClient.stream(systemPrompt, userPrompt)
46-
.doOnNext(token -> {
47-
wordBuffer.append(token);
48-
if (token.equals(" ") || token.matches("[.,!?]")) {
49-
send(emitter, wordBuffer.toString());
50-
wordBuffer.setLength(0);
51-
}
52-
})
53-
.doOnComplete(() -> finalizeFeedback(answer, quiz, wordBuffer, emitter))
54-
.doOnError(emitter::completeWithError)
55-
.subscribe();
56-
57-
} catch (Exception e) {
58-
emitter.completeWithError(e);
59-
}
60-
}
31+
var answer = userQuizAnswerRepository.findById(answerId)
32+
.orElseThrow(() -> new AiException(AiExceptionCode.NOT_FOUND_ANSWER));
6133

62-
@Transactional
63-
public void streamSentence(Long answerId, SseEmitter emitter) {
64-
try {
65-
var answer = prepare(answerId, emitter);
66-
if (answer == null) {
34+
if (answer.getAiFeedback() != null) {
35+
emitter.send(SseEmitter.event().data("이미 처리된 요청입니다."));
36+
emitter.complete();
6737
return;
6838
}
6939

@@ -84,7 +54,33 @@ public void streamSentence(Long answerId, SseEmitter emitter) {
8454
sentenceBuffer.setLength(0);
8555
}
8656
})
87-
.doOnComplete(() -> finalizeFeedback(answer, quiz, sentenceBuffer, emitter))
57+
.doOnComplete(() -> {
58+
try {
59+
if (sentenceBuffer.length() > 0) {
60+
send(emitter, sentenceBuffer.toString());
61+
}
62+
send(emitter, "[종료]");
63+
String feedback = sentenceBuffer.toString();
64+
boolean isCorrect = feedback.startsWith("정답");
65+
66+
User user = answer.getUser();
67+
if (user != null) {
68+
double score = isCorrect
69+
? user.getScore() + (quiz.getType().getScore() * quiz.getLevel()
70+
.getExp())
71+
: user.getScore() + 1;
72+
user.updateScore(score);
73+
}
74+
75+
answer.updateIsCorrect(isCorrect);
76+
answer.updateAiFeedback(feedback);
77+
userQuizAnswerRepository.save(answer);
78+
79+
emitter.complete();
80+
} catch (Exception e) {
81+
emitter.completeWithError(e);
82+
}
83+
})
8884
.doOnError(emitter::completeWithError)
8985
.subscribe();
9086

@@ -93,54 +89,13 @@ public void streamSentence(Long answerId, SseEmitter emitter) {
9389
}
9490
}
9591

96-
private UserQuizAnswer prepare(Long answerId, SseEmitter emitter) throws IOException {
97-
emitter.onTimeout(emitter::complete);
98-
emitter.onError(emitter::completeWithError);
99-
100-
var answer = userQuizAnswerRepository.findById(answerId)
101-
.orElseThrow(() -> new AiException(AiExceptionCode.NOT_FOUND_ANSWER));
102-
103-
if (answer.getAiFeedback() != null) {
104-
emitter.send(SseEmitter.event().data("이미 처리된 요청입니다."));
105-
emitter.complete();
106-
return null;
107-
}
108-
return answer;
109-
}
110-
111-
private void finalizeFeedback(UserQuizAnswer answer, Quiz quiz, StringBuilder buffer,
112-
SseEmitter emitter) {
113-
try {
114-
if (buffer.length() > 0) {
115-
send(emitter, buffer.toString());
116-
}
117-
118-
String feedback = buffer.toString();
119-
boolean isCorrect = feedback.startsWith("정답");
120-
121-
User user = answer.getUser();
122-
if (user != null) {
123-
double score = isCorrect
124-
? user.getScore() + (quiz.getType().getScore() * quiz.getLevel().getExp())
125-
: user.getScore() + 1;
126-
user.updateScore(score);
127-
}
128-
129-
answer.updateIsCorrect(isCorrect);
130-
answer.updateAiFeedback(feedback);
131-
userQuizAnswerRepository.save(answer);
132-
133-
emitter.complete();
134-
} catch (Exception e) {
135-
emitter.completeWithError(e);
136-
}
137-
}
138-
13992
private void send(SseEmitter emitter, String data) {
14093
try {
14194
emitter.send(SseEmitter.event().data(data));
14295
} catch (IOException e) {
96+
log.error("SSE send error: {}", e.getMessage(), e);
14397
emitter.completeWithError(e);
98+
throw new RuntimeException(e);
14499
}
145100
}
146101
}

cs25-service/src/main/java/com/example/cs25service/domain/ai/service/AiFeedbackStreamWorker.java

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,8 @@ private void poll(String consumerName) {
5656
if (messages != null) {
5757
for (MapRecord<String, Object, Object> message : messages) {
5858
Long answerId = Long.valueOf(message.getValue().get("answerId").toString());
59-
Object modeObj = message.getValue().get("mode");
60-
if (modeObj == null) {
61-
log.error("Mode is missing for answerId: {}", answerId);
62-
redisTemplate.opsForStream()
63-
.acknowledge(RedisStreamConfig.STREAM_KEY, GROUP_NAME,
64-
message.getId());
65-
continue;
66-
}
67-
String mode = modeObj.toString();
68-
6959
SseEmitter emitter = emitterRegistry.get(answerId);
60+
7061
if (emitter == null) {
7162
log.warn("No emitter found for answerId: {}", answerId);
7263
redisTemplate.opsForStream()
@@ -75,22 +66,9 @@ private void poll(String consumerName) {
7566
continue;
7667
}
7768

78-
switch (mode) {
79-
case "sentence":
80-
processor.streamSentence(answerId, emitter);
81-
break;
82-
case "word":
83-
processor.streamWord(answerId, emitter);
84-
break;
85-
default:
86-
log.error("Unknown mode: {} for answerId: {}", mode, answerId);
87-
emitterRegistry.remove(answerId);
88-
redisTemplate.opsForSet()
89-
.remove(AiFeedbackQueueService.DEDUPLICATION_SET_KEY, answerId);
90-
break;
91-
}
92-
69+
processor.stream(answerId, emitter);
9370
emitterRegistry.remove(answerId);
71+
9472
redisTemplate.opsForSet()
9573
.remove(AiFeedbackQueueService.DEDUPLICATION_SET_KEY, answerId);
9674

cs25-service/src/main/java/com/example/cs25service/domain/mail/service/MailService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public void sendVerificationCodeEmail(String toEmail, String code) throws Messag
2727

2828
MimeMessage message = mailSender.createMimeMessage();
2929
MimeMessageHelper helper = new MimeMessageHelper(message, true, "UTF-8");
30-
3130
helper.setTo(toEmail);
3231
helper.setSubject("[CS25] 이메일 인증코드");
3332
helper.setText(htmlContent, true); // true = HTML

cs25-service/src/main/java/com/example/cs25service/domain/profile/service/ProfileService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ public CategoryUserAnswerRateResponse getUserQuizAnswerCorrectRate(AuthUser auth
118118
() -> new UserException(UserExceptionCode.NOT_FOUND_USER)
119119
);
120120

121+
// 사용자에게 구독정보가 없으면 예외처리
122+
if(user.getSubscription() == null) {
123+
throw new UserException(UserExceptionCode.NOT_FOUND_SUBSCRIPTION);
124+
}
125+
121126
Long userId = user.getId();
122127

123128
//유저 Id에 따른 구독 정보의 대분류 카테고리 조회

cs25-service/src/main/java/com/example/cs25service/domain/security/config/SecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public SecurityFilterChain filterChain(HttpSecurity http,
7373

7474
//로그인이 필요한 서비스만 여기다가 추가하기 (permaiAll 은 패싱 ㄱㄱ)
7575
.requestMatchers(HttpMethod.GET, "/users/**").hasAnyRole(PERMITTED_ROLES)
76-
.requestMatchers(HttpMethod.POST, "/auth/**").hasAnyRole(PERMITTED_ROLES)
76+
.requestMatchers(HttpMethod.POST, "/auth/logout/**").hasAnyRole(PERMITTED_ROLES)
7777
.requestMatchers("/admin/**").hasRole("ADMIN")
7878
.requestMatchers(HttpMethod.POST, "/crawlers/github/**").hasRole("ADMIN")
7979

cs25-service/src/main/java/com/example/cs25service/domain/security/jwt/dto/ReissueRequestDto.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@
88
public class ReissueRequestDto {
99

1010
private String refreshToken;
11+
12+
public ReissueRequestDto(String refreshToken) {
13+
this.refreshToken = refreshToken;
14+
}
1115
}

cs25-service/src/main/java/com/example/cs25service/domain/security/jwt/provider/JwtTokenProvider.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public boolean validateToken(String token) throws JwtAuthenticationException {
9797
}
9898
}
9999

100-
private Claims parseClaims(String token) throws JwtAuthenticationException {
100+
Claims parseClaims(String token) throws JwtAuthenticationException {
101101
try {
102102
return Jwts.parser()
103103
.verifyWith(key)
@@ -115,10 +115,6 @@ public String getAuthorId(String token) throws JwtAuthenticationException {
115115
return parseClaims(token).getSubject();
116116
}
117117

118-
// public String getEmail(String token) throws JwtAuthenticationException {
119-
// return parseClaims(token).get("email", String.class);
120-
// }
121-
122118
public String getNickname(String token) throws JwtAuthenticationException {
123119
return parseClaims(token).get("nickname", String.class);
124120
}

0 commit comments

Comments
 (0)