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

[Refactor] Chat 메시지 기능 리팩토링 #128

Merged
merged 9 commits into from
Dec 7, 2024

Conversation

deveunhwa
Copy link
Collaborator

closed #84

#️⃣ 연관된 이슈 번호

related #84 : [Refactor] Chat 메시지 기능 리팩토링


✅ PR 유형

  • 새로운 기능 추가
  • 코드 리팩토링

📝 작업 내용

  • websocket + STOMP 적용
  • Redis 적용
  • MongoDB 적용

🔍 테스트 결과

  • 채팅방 생성
    스크린샷 2024-12-06 011149

  • 채팅방 조회
    스크린샷 2024-12-06 012410

  • 채팅방 목록 조회
    스크린샷 2024-12-06 011727

  • 채팅방 삭제
    스크린샷 2024-12-06 012814

  • 메시지 전송
    스크린샷 2024-12-06 013538

  • MongoDB 적용
    스크린샷 2024-12-06 005750
    스크린샷 2024-12-06 005737


🎈 변경 사항 체크리스트

  • 코드에 영향이 있는 모든 부분에 대한 테스트를 작성하고 실행했나요?
  • 코드 컨벤션에 따라 코드를 작성했나요?
  • 본 PR에서 발생할 수 있는 모든 의존성 문제가 해결되었나요?

✨ 피드백 반영사항


💬 리뷰 요구사항


…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
@deveunhwa deveunhwa added ✨ Feature 기능 개발 🔧 Refactor 코드 리팩토링 labels Dec 7, 2024
@deveunhwa deveunhwa self-assigned this Dec 7, 2024
@deveunhwa deveunhwa closed this Dec 7, 2024
@deveunhwa deveunhwa reopened this Dec 7, 2024
@deveunhwa deveunhwa merged commit 88bd429 into develop Dec 7, 2024
@Override
@NonNull
public MongoClient mongoClient() {
ConnectionString connectionString = new ConnectionString("mongodb://localhost:27017/ijuju");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분도 환경 변수나 시크릿으로 처리해주세요~!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵! 반영하겠습니다.

Comment on lines +7 to +12
public class ChatTaskException extends RuntimeException {

private final String code;
private final String message;
private final int statusCode;
private final HttpStatus httpStatus;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

글로벌 에러처리 대신 사용하신 이유가 있을까요? httpStatus와 statusCode를 같이 쓰신 이유도 궁금합니다!

Copy link
Collaborator Author

@deveunhwa deveunhwa Dec 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

글로벌 에러 처리는 이미 완료했습니다.이 파일은 제거되어야 하는데 제거 대상에서 빠진 것 같아요. 다음 PR 때 삭제하겠습니다.

Comment on lines +10 to +14
public class ApiResponse<T> {
private String code;
private String message;
private T data;
private int statusCode;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ApiResponse 만드셨네요 ~! 다음에 다같이 적용해보면 좋을 것 같습니다 👍

Copy link
Collaborator Author

@deveunhwa deveunhwa Dec 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

글로벌 에러 처리로 파일 제거 대상 파일이었는데 누락되었습니다. 다음 PR 때 삭제하겠습니다.

Comment on lines +19 to +20
main:
allow-bean-definition-overriding: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 설정이 배포 환경에서도 포함되어야할까요?

Copy link
Collaborator Author

@deveunhwa deveunhwa Dec 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

배포 환경에 포함되면 안됩니다. yml파일에서도 제거 할 예정입니다.

Copy link
Collaborator

@1mjay 1mjay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~!

Copy link
Collaborator

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
수정이 필요하네요

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 완료했습니다.

@deveunhwa
Copy link
Collaborator Author

리뷰 감사합니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발 🔧 Refactor 코드 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants