-
Notifications
You must be signed in to change notification settings - Fork 3
[feat] 방 입장 및 validation 체크 #19
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
Conversation
# Conflicts: # backend/src/main/java/io/f1/backend/domain/game/api/RoomController.java # backend/src/main/java/io/f1/backend/domain/game/app/RoomService.java # backend/src/main/java/io/f1/backend/domain/game/mapper/RoomMapper.java # backend/src/main/java/io/f1/backend/domain/game/store/RoomRepository.java # backend/src/main/java/io/f1/backend/domain/game/store/RoomRepositoryImpl.java
backend/src/main/java/io/f1/backend/domain/game/app/RoomService.java
Outdated
Show resolved
Hide resolved
# Conflicts: # backend/src/main/java/io/f1/backend/domain/game/api/RoomController.java # backend/src/main/java/io/f1/backend/domain/game/app/RoomService.java # backend/src/main/java/io/f1/backend/domain/game/dto/response/RoomValidationResponse.java
| @AllArgsConstructor | ||
| public class DefaultWebSocketResponse<T> implements WebSocketDto<T> { | ||
| private final MessageType type; | ||
| private final T message; |
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.
바로 WebSocketDto를 클래스로 사용하지 않고, 이를 implement 하는 식으로 구현한 이유가 궁금합니다 ! 추후에 확장 가능성이 있는 건가요?
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.
우선은 WebSocket으로 주고받는 응답은 반드시 type과 message라는 구조를 가져야 한다는 의도를 명확히 하기 위해서 인터페이스로 분리했습니다.
추후에 확장 가능성을 생각할 때도 interface로 강제해두면 이후 응답 형태가 늘어나도 일관된 구조를 유지할 수 있다는 점에서 인터페이스를 설계하였습니다!
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.
옹 ! 이해했습니다. 답변 감사합니다 ! :)
no content로 응답 변경으로 인한 응답 dto 삭제
silver-eunjoo
left a comment
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.
굉장한 코드입니다... 고생하셨습니다 ! :)
LimKangHyun
left a comment
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.
고생하셨습니다!
🛰️ Issue Number
close #6
🪐 작업 내용
흐름
입장 버튼 클릭 시
validation 체크
enter 로직 생성 (입장 요청 시 실행되는 흐름 )
웹소켓 연결
웹소켓 dto interface 생성
📚 Reference
https://docs.spring.io/spring-framework/reference/web/websocket/stomp/interceptors.html
https://github.com/spring-guides/gs-messaging-stomp-websocket/blob/main/complete/src/main/resources/static/app.js
✅ Check List