Skip to content

Conversation

@jueunk617
Copy link
Collaborator

📌 개요

  • 온라인 스터디 카페 플랫폼의 실시간 채팅 기능을 위한 WebSocket + STOMP 기본 인프라 구축
  • WebSocket 서버 설정 및 연결 테스트 완료

🔨 작업 내용

  • WebSocket 설정 구현

    • WebSocketConfig 클래스 생성 및 STOMP 메시지 브로커 설정
    • WebSocket 엔드포인트 /ws 등록 (SockJS fallback 지원)
    • CORS 설정 (setAllowedOriginPatterns("*") - 개발환경용)
  • 메시지 브로커 구성

    • /topic: 1:N 브로드캐스트 (방 채팅용)
    • /queue: 1:1 메시지 (개인 DM용)
    • /app: 클라이언트→서버 메시지 전송 prefix
    • /user: 개인 메시지 전용 prefix
  • 헬스체크 API 구현

    • WebSocketTestController 생성
    • GET /api/websocket/health: 서버 상태 확인 엔드포인트
    • GET /api/websocket/info: WebSocket 연결 정보 제공 엔드포인트
  • 패키지 구조 생성

    • com.back.domain.websocket.config: WebSocket 설정
    • com.back.domain.websocket.controller: WebSocket 컨트롤러

🔗 관련 이슈

Closes #33


📝 참고 사항

  • 테스트 확인된 사항

    • 서버 정상 실행 확인
    • 헬스체크 API 정상 응답 확인 (/api/websocket/health, /api/websocket/info)
    • WebSocket 연결 엔드포인트 /ws 접근 가능
  • 다음 단계 작업 예정

    • 실제 채팅 메시지 송수신 기능 구현
    • 채팅 메시지 DB 저장 로직 추가
    • 개인 DM 기능 구현
  • 개발환경 설정

    • CORS는 현재 모든 Origin 허용 (*) - 프로덕션 환경에서는 제한 필요
    • SockJS fallback 지원으로 WebSocket 미지원 브라우저 호환성 확보

✅ 체크리스트

  • 기능 동작 확인
  • 테스트 코드 작성
  • 문서/주석 추가 및 최신화

@github-actions github-actions bot changed the title Feat: WebSocket + STOMP 기본 설정 구현 Feat: WebSocket + STOMP 기본 설정 구현 (#33) Sep 22, 2025
@jueunk617 jueunk617 merged commit 41a38ba into dev Sep 22, 2025
2 checks passed
@github-actions github-actions bot deleted the Feat/33 branch September 22, 2025 07:45
@jueunk617 jueunk617 self-assigned this Sep 22, 2025
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.

4 participants