Spring WebFlux를 이용한 chat 프로그램 - 채팅(2)
이제 채팅창 구성까지 끝났고 이제 메시지를 주고 받는 작업을 한다.DTO 생성ChatMessage.javapackage com.company.common.database.document;import lombok.*;import org.springframework.data.annotation.Id;import org.springframework.data.mongodb.core.mapping.Document;import java.time.LocalDateTime;/** * MongoDB에 저장될 채팅 메시지 도큐먼트 */@Document(collection = "chat_messages")@Data@NoArgsConstructor@AllArgsConstructor@Builderpublic class Chat..
2025.05.10