Skip to content
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

[FEAT] 디스코드 알림 로직 추가 #126

Merged
merged 22 commits into from
Mar 28, 2025
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1861f1a
chore: discord bot 의존성 추가
coli-geonwoo Mar 21, 2025
d27aeb1
feat: discord properties 구현
coli-geonwoo Mar 21, 2025
1da6066
feat: discord notifier 구현
coli-geonwoo Mar 21, 2025
a9c2954
feat: discord notification aop 작성
coli-geonwoo Mar 21, 2025
e66a393
fix: discord 에러 픽스
coli-geonwoo Mar 21, 2025
1035ea2
feat: 디스코드 알림 기능 구현
coli-geonwoo Mar 21, 2025
e84d4d3
style: 개행 추가
coli-geonwoo Mar 21, 2025
1cedd98
chore: 테스트용 yml 파일 수정
coli-geonwoo Mar 23, 2025
06da828
refactor: channelNotifier 인터페이스화
coli-geonwoo Mar 23, 2025
073962d
test: 테스트에 controller mocking
coli-geonwoo Mar 23, 2025
97e577e
test: channelNotifier 모킹
coli-geonwoo Mar 23, 2025
713f971
chore: ChannelNotifier 리네임
coli-geonwoo Mar 28, 2025
0815fa6
chore: discord 설정을 prod,dev yml파일에 반영
coli-geonwoo Mar 28, 2025
c2ec37b
chore: client 패키지 구조화
coli-geonwoo Mar 28, 2025
2e39b21
refactor: config 파일로 프로파이별 의존성 관리
coli-geonwoo Mar 28, 2025
620144a
chore : test base에서 notifier 모킹 제거
coli-geonwoo Mar 28, 2025
16a8c06
refactor: discordnotifier 수동빈 등록에 따른 컴포넌트화 제거
coli-geonwoo Mar 28, 2025
f2eba9a
refactor: norifierConfig에서 properties 임포트
coli-geonwoo Mar 28, 2025
01e2eac
refactor: ConsoleNotifier에 에러메시지 출력기능도 추가
coli-geonwoo Mar 28, 2025
8898de9
refactor : DiscordProperties 가 특정 프로파일에만 등록되도록 변경
leegwichan Mar 28, 2025
c7ce165
refactor: ConsoleNotifier에 log로 출력
coli-geonwoo Mar 28, 2025
5b24092
refactor: 디스코드 기준 개행문자로 통일
coli-geonwoo Mar 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: discord notification aop 작성
coli-geonwoo committed Mar 21, 2025
commit a9c2954369759a4562fd989e3d8df2f9f510fccf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.debatetimer.aop.exception;

import com.debatetimer.client.DiscordNotifier;
import lombok.RequiredArgsConstructor;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
@RequiredArgsConstructor
public class ExceptionNotificationAspect {

private final DiscordNotifier discordNotifier;

@Pointcut("@within(org.springframework.web.bind.annotation.RestController)")
public void restControllers() {
}

@AfterThrowing(pointcut = "restControllers()", throwing = "exception")
public void sendDiscordNotification(JoinPoint joinPoint, Exception exception) {
discordNotifier.sendErrorMessage(exception);

}
}