-
Notifications
You must be signed in to change notification settings - Fork 4
CLAP-126 시스템 알림 생성 #101
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
CLAP-126 시스템 알림 생성 #101
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4d93afd
CLAP-126 Feature : 작업 생성 method에 알림 생성 event 생성 logic 추가
starboxxxx 1bc7e7a
CLAP-126 Feature : 알림 생성에 대한 EventListener 설정
starboxxxx abe0780
CLAP-126 Feature : 담당자들만 조회하는 method 생성
starboxxxx 3888400
CLAP-126 Feature : 알림 생성 method 구현
starboxxxx e935a63
CLAP-126 Fix : 트랜잭션 생성 annotation 추가
starboxxxx 6aa140d
CLAP-126 Fix : @TestContainers annotation 추가
starboxxxx f965d1c
CLAP-126 Fix : taskId 외래키가 존재함으로 taskTitle도 조회가능
starboxxxx 5c8b120
CLAP-126 Fix : Merge Conflict 해결을 위한 수정
starboxxxx c5c1a7c
CLAP-126 Fix : Merge Conflict 해결을 위한 수정
starboxxxx 0d985c4
CLAP-126 Fix : @Builder Annotation 추가
starboxxxx 27fc805
CLAP-126 Fix : CreateNotificationRequest 제거 및 Builder 사용
starboxxxx 7c5d628
CLAP-126 Fix : merge conflict
starboxxxx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
23 changes: 23 additions & 0 deletions
23
src/main/java/clap/server/adapter/outbound/persistense/evenlistener/CustomEventListener.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package clap.server.adapter.outbound.persistense.evenlistener; | ||
|
|
||
| import clap.server.application.service.notification.CreateNotificationService; | ||
| import clap.server.domain.model.notification.Notification; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.stereotype.Component; | ||
| import org.springframework.transaction.annotation.Propagation; | ||
| import org.springframework.transaction.annotation.Transactional; | ||
| import org.springframework.transaction.event.TransactionPhase; | ||
| import org.springframework.transaction.event.TransactionalEventListener; | ||
|
|
||
| // 이벤트 발행 시 실행 | ||
| @RequiredArgsConstructor | ||
| @Component | ||
| public class CustomEventListener { | ||
| private final CreateNotificationService createNotificationService; | ||
|
|
||
| @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) | ||
| @Transactional(propagation = Propagation.REQUIRES_NEW) | ||
| public void handler(Notification request) { | ||
| createNotificationService.createNotification(request); | ||
| } | ||
| } |
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
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
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
7 changes: 7 additions & 0 deletions
7
...ain/java/clap/server/application/port/inbound/notification/CreateNotificationUsecase.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package clap.server.application.port.inbound.notification; | ||
|
|
||
| import clap.server.domain.model.notification.Notification; | ||
|
|
||
| public interface CreateNotificationUsecase { | ||
| void createNotification(Notification notification); | ||
| } |
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
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
20 changes: 20 additions & 0 deletions
20
src/main/java/clap/server/application/service/notification/CreateNotificationService.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package clap.server.application.service.notification; | ||
|
|
||
| import clap.server.application.port.inbound.notification.CreateNotificationUsecase; | ||
| import clap.server.application.port.outbound.notification.CommandNotificationPort; | ||
| import clap.server.common.annotation.architecture.ApplicationService; | ||
| import clap.server.domain.model.notification.Notification; | ||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| @ApplicationService | ||
| @RequiredArgsConstructor | ||
| public class CreateNotificationService implements CreateNotificationUsecase { | ||
|
|
||
| private final CommandNotificationPort commandNotificationPort; | ||
|
|
||
| @Override | ||
| public void createNotification(Notification request) { | ||
|
|
||
| commandNotificationPort.save(request); | ||
| } | ||
| } |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빌더 선언 부탁드립니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 추가해놓았습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joowojr 수정해서 다시 commit 올려놨습니다. 확인 부탁드립니다!