-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Refactor] Chat 메시지 기능 리팩토링 #128
Conversation
…al-project/WEB1_2_Child-Learn_BE into feature/chat/SCRUM-90 # Conflicts: # build.gradle
…al-project/WEB1_2_Child-Learn_BE into feature/chat/SCRUM-138 # Conflicts: # build.gradle # src/main/java/com/prgrms/ijuju/domain/member/service/MemberService.java # src/main/java/com/prgrms/ijuju/global/exception/CustomException.java # src/main/java/com/prgrms/ijuju/global/exception/GlobalExceptionHandler.java
…al-project/WEB1_2_Child-Learn_BE into feature/chat/SCRUM-138 # Conflicts: # src/main/java/com/prgrms/ijuju/domain/chat/entity/Chat.java # src/main/java/com/prgrms/ijuju/domain/chat/exception/ChatException.java # src/main/java/com/prgrms/ijuju/domain/chat/service/ChatService.java # src/main/java/com/prgrms/ijuju/domain/friend/entity/FriendRequest.java # src/main/java/com/prgrms/ijuju/domain/friend/exception/FriendException.java # src/main/java/com/prgrms/ijuju/domain/friend/service/FriendService.java # src/main/java/com/prgrms/ijuju/domain/stock/mid/service/MidStockTradeService.java # src/main/java/com/prgrms/ijuju/domain/wallet/entity/Wallet.java # src/main/java/com/prgrms/ijuju/domain/wallet/exception/WalletException.java # src/main/java/com/prgrms/ijuju/domain/wallet/service/TransactionService.java # src/main/java/com/prgrms/ijuju/domain/wallet/service/WalletService.java # src/main/java/com/prgrms/ijuju/global/exception/CustomException.java
@Override | ||
@NonNull | ||
public MongoClient mongoClient() { | ||
ConnectionString connectionString = new ConnectionString("mongodb://localhost:27017/ijuju"); |
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.
넵! 반영하겠습니다.
public class ChatTaskException extends RuntimeException { | ||
|
||
private final String code; | ||
private final String message; | ||
private final int statusCode; | ||
private final HttpStatus httpStatus; |
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.
글로벌 에러처리 대신 사용하신 이유가 있을까요? httpStatus와 statusCode를 같이 쓰신 이유도 궁금합니다!
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.
글로벌 에러 처리는 이미 완료했습니다.이 파일은 제거되어야 하는데 제거 대상에서 빠진 것 같아요. 다음 PR 때 삭제하겠습니다.
public class ApiResponse<T> { | ||
private String code; | ||
private String message; | ||
private T data; | ||
private int statusCode; |
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.
엇 ApiResponse
만드셨네요 ~! 다음에 다같이 적용해보면 좋을 것 같습니다 👍
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.
글로벌 에러 처리로 파일 제거 대상 파일이었는데 누락되었습니다. 다음 PR 때 삭제하겠습니다.
main: | ||
allow-bean-definition-overriding: true |
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.
배포 환경에 포함되면 안됩니다. yml파일에서도 제거 할 예정입니다.
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.
data:
mongodb:
uri: mongodb://localhost:27017/ijuju
redis:
host: localhost
port: 6379
수정이 필요하네요
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.
수정 완료했습니다.
리뷰 감사합니다! |
closed #84
#️⃣ 연관된 이슈 번호
related #84 : [Refactor] Chat 메시지 기능 리팩토링
✅ PR 유형
📝 작업 내용
🔍 테스트 결과
채팅방 생성
![스크린샷 2024-12-06 011149](https://private-user-images.githubusercontent.com/180101230/393470516-a14291d6-f74d-422b-8d00-2eb0e5c6d7c4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MDkxNTIsIm5iZiI6MTczOTYwODg1MiwicGF0aCI6Ii8xODAxMDEyMzAvMzkzNDcwNTE2LWExNDI5MWQ2LWY3NGQtNDIyYi04ZDAwLTJlYjBlNWM2ZDdjNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwODQwNTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04ZjVmZDQ5YWZlMDdlZGZkNWNjYjE2YTQ4YmJjZTQ3ZTg3Mjc3MTQ5NmZlYmY1YzA4MTU1OGYwY2Y2NzdmM2E1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.WRUoTIyqcEwg6Vo15bUCTIKJEuGMl2VOFRX_XAkisQw)
채팅방 조회
![스크린샷 2024-12-06 012410](https://private-user-images.githubusercontent.com/180101230/393470514-511d3989-8cc1-4cd8-a446-fac033fbc053.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MDkxNTIsIm5iZiI6MTczOTYwODg1MiwicGF0aCI6Ii8xODAxMDEyMzAvMzkzNDcwNTE0LTUxMWQzOTg5LThjYzEtNGNkOC1hNDQ2LWZhYzAzM2ZiYzA1My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwODQwNTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mYmJmOWZhZWJkNzg5YmI4YWY1NGFmMDQyMDU1YTE0MGZkYzMwYzYxNmVjMDcwNDI4OTM3NmE1ODBhOGEyN2Q0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.g7fdfhf-Y8sXLtEwt7go3Saw8F15lnSJcbe9vHWsOOY)
채팅방 목록 조회
![스크린샷 2024-12-06 011727](https://private-user-images.githubusercontent.com/180101230/393470515-53ddd868-edc5-4c1d-9fdd-b8adb66e697a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MDkxNTIsIm5iZiI6MTczOTYwODg1MiwicGF0aCI6Ii8xODAxMDEyMzAvMzkzNDcwNTE1LTUzZGRkODY4LWVkYzUtNGMxZC05ZmRkLWI4YWRiNjZlNjk3YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwODQwNTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01OWU5ZGQ2NjYwYTAyMmEzNGE3YTU4N2JmMjYwNzNjZGVmYzAxMzQwMjk5Mzg5ZTE1MWRjZGY1N2M1MzMyN2I4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.inuI9oC96AHhbp11_6nNApmQ1fPVwFRSLF9MtHixhog)
채팅방 삭제
![스크린샷 2024-12-06 012814](https://private-user-images.githubusercontent.com/180101230/393470512-55a7f6e1-8e2b-4b22-bdb7-6318b7915adc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MDkxNTIsIm5iZiI6MTczOTYwODg1MiwicGF0aCI6Ii8xODAxMDEyMzAvMzkzNDcwNTEyLTU1YTdmNmUxLThlMmItNGIyMi1iZGI3LTYzMThiNzkxNWFkYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwODQwNTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hODdiMWNjNWE1ZTEwMDEyNGRjZWE0YTVhOWY1M2ZjNTg5NmMxMTI3Y2QxNTllN2EzMjk0ODI4YzFmMDg0YWYyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ma2bkfUvY0yEK6nCzlM7C_eAOfth3klbhD8nb1SIVKI)
메시지 전송
![스크린샷 2024-12-06 013538](https://private-user-images.githubusercontent.com/180101230/393470511-93e4a1bb-a89a-4df8-b041-847be929b144.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MDkxNTIsIm5iZiI6MTczOTYwODg1MiwicGF0aCI6Ii8xODAxMDEyMzAvMzkzNDcwNTExLTkzZTRhMWJiLWE4OWEtNGRmOC1iMDQxLTg0N2JlOTI5YjE0NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwODQwNTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mZjAzNGNmYmY3ODdmZTMwZjY3ZWZiNzZhNzIzNGUyNjdlYTcyNDhiNzA2MzAyNmEzMmE3ZjQxZWFkOTU5MDcyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.AnCeS-qrnL_jQi0iBcroASnJ1Uz-XELCQNTanbWjcuM)
MongoDB 적용
![스크린샷 2024-12-06 005750](https://private-user-images.githubusercontent.com/180101230/393470501-194edd96-72e1-4b11-9553-1902a6dd9eeb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MDkxNTIsIm5iZiI6MTczOTYwODg1MiwicGF0aCI6Ii8xODAxMDEyMzAvMzkzNDcwNTAxLTE5NGVkZDk2LTcyZTEtNGIxMS05NTUzLTE5MDJhNmRkOWVlYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNT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dCJ9.QINLOf34d1aTVFvyfuBVwSZXqZ8yVD39cXG5ULF1oIg)
🎈 변경 사항 체크리스트
✨ 피드백 반영사항
💬 리뷰 요구사항