-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: Feign 활용한 디스코드 에러 시스템 구축 #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Caution Review failedThe pull request is closed. ## Walkthrough
이 변경사항은 Discord 알람 기능을 위한 Feign 클라이언트 및 서비스 도입, 예외 처리 핸들러의 알람 연동, Spring Cloud OpenFeign 지원 추가, 그리고 기존 Logback 기반 Discord 연동 로깅 설정 파일 삭제를 포함합니다. 인프라와 각 API 모듈의 빌드 스크립트 및 예외 처리 로직이 업데이트되었습니다.
## Changes
| Cohort / File(s) | Change Summary |
|------------------|---------------|
| **Spring Cloud & Feign 도입**<br>nowait-app-admin-api/build.gradle<br>nowait-app-user-api/build.gradle<br>nowait-infra/build.gradle | Spring Cloud BOM 및 OpenFeign 의존성 추가, 일부 로깅 관련 의존성 제거, Feign-Gson 추가 |
| **Feign 클라이언트 및 DTO, 설정 추가**<br>nowait-infra/src/main/java/com/nowait/discord/client/DiscordClientAdmin.java<br>nowait-infra/src/main/java/com/nowait/discord/client/DiscordClientUser.java<br>nowait-infra/src/main/java/com/nowait/discord/config/DiscordFeignConfiguration.java<br>nowait-infra/src/main/java/com/nowait/discord/dto/DiscordMessage.java | Discord용 Feign 클라이언트(Admin/User), 메시지 DTO, Feign 로깅 설정 클래스 추가 |
| **Discord 알람 서비스 추가**<br>nowait-infra/src/main/java/com/nowait/discord/service/DiscordAlarmService.java | 예외 발생 시 Discord로 알람을 발송하는 서비스 클래스 신규 추가 |
| **예외 처리기 Discord 알람 연동**<br>nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/exception/GlobalExceptionHandler.java<br>nowait-app-user-api/src/main/java/com/nowait/applicationuser/exception/GlobalExceptionHandler.java | 모든 예외 핸들러에 Discord 알람 호출 추가, WebRequest 파라미터 추가, User API에 StoreNotFoundException 핸들러 신설 |
| **Feign 클라이언트 활성화**<br>nowait-app-admin-api/src/main/java/com/nowait/ApiAdminApplication.java<br>nowait-app-user-api/src/main/java/com/nowait/ApiUserApplication.java | @EnableFeignClients 애노테이션 추가로 Feign 클라이언트 사용 활성화 |
| **Logback Discord 연동 설정 삭제**<br>nowait-app-admin-api/src/main/resources/logback-admin-dev.xml<br>nowait-app-admin-api/src/main/resources/logback-variables.properties<br>nowait-app-user-api/src/main/resources/logback-user-dev.xml<br>nowait-app-user-api/src/main/resources/logback-variables.properties | 기존 환경별 Discord 연동 Logback 설정 파일 및 변수 파일 삭제 |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant Client
participant Controller
participant GlobalExceptionHandler
participant DiscordAlarmService
participant DiscordClient (Feign)
Client->>Controller: API 요청
Controller-->>GlobalExceptionHandler: 예외 발생
GlobalExceptionHandler->>DiscordAlarmService: sendDiscord[User/Admin]Alarm(e, request)
DiscordAlarmService->>DiscordClient: sendAlarm(DiscordMessage)
DiscordClient-->>DiscordAlarmService: (응답 없음)
DiscordAlarmService-->>GlobalExceptionHandler: (void)
GlobalExceptionHandler-->>Client: ErrorResponse 반환Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
작업 요약
Issue Link
#171
문제점 및 어려움
해결 방안
Reference
Summary by CodeRabbit
신규 기능
버그 수정
리팩터링
환경설정/빌드