Skip to content

Conversation

@minmin02
Copy link
Collaborator

@minmin02 minmin02 commented Jan 13, 2026

[Feat]/{Team/Chat}/{채팅 엔티티,리포지토리+ WebSocket 및 Redis Pub/Sub 기본 구조 구현}

🎯 작업 내용

  • Chat 엔티티 생성 (ChatRoom, ChatMessage, ChatRoomMember, ChatFile)
  • WebSocket 설정 추가 - Redis Pub/Sub 설정 추가
    * RedisMessageListenerContainer 설정 (채팅방 패턴 구독)
    * MessageListenerAdapter 설정 (Subscriber 연동)
  • RedisPublisher 및 RedisSubscriber 구현
  • 채팅 관련 Repository 생성(추가작업필요)
  • 채팅 DTO 및 예외 처리 추가"

주요 변경사항

  • Chat 엔티티 생성 (ChatRoom, ChatMessage, ChatRoomMember, ChatFile)
  • WebSocket 설정 추가 - Redis Pub/Sub 설정 추가
    * RedisMessageListenerContainer 설정 (채팅방 패턴 구독)
    * MessageListenerAdapter 설정 (Subscriber 연동)
  • RedisPublisher 및 RedisSubscriber 구현
  • 채팅 관련 Repository 생성(추가작업필요)
  • 채팅 DTO 및 예외 처리 추가"

상세 내용

  • 비즈니스 로직 구현하면 API 추가하겠습니다.
  • 빌드 완료 하였습니다.

✅ 체크리스트

  • 코드 빌드가 정상적으로 완료되었나요?
  • 테스트(API 명세)를 추가/수정했나요?
  • 코드 리뷰 요청 전 self-review를 진행했나요?

📋 API 명세서

  1. 명세서는 컨트롤러와 서비스 구현 마무리 되면 올리겠습니다.

💬 리뷰 요청사항 (선택)

  • 멀티모듈이 처음인데 NectApiApplication 위에 @EntityScan과 @EnableJpaRepositorie 어노테이션을 달아야지 로컬 db에 테이블이 생성이 되는데 이렇게 하는게 맞는지 궁금합니다!
  • CI 환경에 Redis가 없어서 테스트가 실패한다는데 어떻게 하면 되는지 궁금합니다

📚 참고 자료 (선택)

Copy link
Member

@kjunh972 kjunh972 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다


@SpringBootApplication
@EnableJpaAuditing
// 엔티티 , 리포지토리 스캔
Copy link
Member

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.

서비스에서 리포지토리 주입할 때 리포지토리가 다른 모듈에 있어 실행이 안되던데 멀티모듈이 처음이라 혹시 다른 방법이 있는 지 궁금합니다!


import java.util.List;

//전체 채팅방
Copy link
Member

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.

넵 알겠습니다

//채팅방 내부
@Repository
public interface ChatMessageRepository extends JpaRepository<ChatMessage,Long> {
//채팅방 메시지 조회
Copy link
Member

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.

구분용으로 써놓은건데 pr올릴 때 지우겠습니다

jobs:
test:
runs-on: ubuntu-latest
# Redis 서비스 추가
Copy link
Member

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.

ci 빌드할 때 레디스가 없다해서 추가해봤는데 이 부분 어떻게 처리하면 좋을지 궁금합니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants