From 1472ec0cdc1944fcd38f66805bf8e1231ab181b4 Mon Sep 17 00:00:00 2001 From: HyemIin Date: Fri, 12 Jan 2024 16:11:07 +0900 Subject: [PATCH] =?UTF-8?q?Refactor=20:=20ChatRoom=20=EC=A7=81=EB=A0=AC?= =?UTF-8?q?=ED=99=94=20=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - JPA 의존성 추가 - ChatRoom 직렬화 추가 --- build.gradle | 3 +++ .../java/com/catchroom/chat/chatroom/entity/ChatRoom.java | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 32e7a50..3cb77c3 100644 --- a/build.gradle +++ b/build.gradle @@ -51,6 +51,9 @@ dependencies { implementation 'mysql:mysql-connector-java:8.0.32' runtimeOnly 'com.mysql:mysql-connector-j' + //jpa + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.webjars.bower:bootstrap:4.3.1' implementation 'org.webjars.bower:vue:2.5.16' diff --git a/src/main/java/com/catchroom/chat/chatroom/entity/ChatRoom.java b/src/main/java/com/catchroom/chat/chatroom/entity/ChatRoom.java index a69e62e..a429994 100644 --- a/src/main/java/com/catchroom/chat/chatroom/entity/ChatRoom.java +++ b/src/main/java/com/catchroom/chat/chatroom/entity/ChatRoom.java @@ -1,11 +1,15 @@ package com.catchroom.chat.chatroom.entity; -import jakarta.persistence.*; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import java.io.Serializable; import java.util.UUID; @Entity @@ -13,7 +17,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class ChatRoom { +public class ChatRoom implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY)