From 84d8e621d08fc3f40cbfcdb0b0b60c5cd01759ad Mon Sep 17 00:00:00 2001 From: gyungchan Jo Date: Tue, 16 Jul 2024 12:24:14 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=EC=B4=88=EA=B8=B0=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/corea/DataInitializer.java | 24 ++++++++++--------- .../{cotroller => room}/RoomController.java | 2 +- .../java/corea/fixture/MemberFixture.java | 2 +- .../corea/member/domain/MatchingTest.java | 11 ++++----- .../member/service/MatchingServiceTest.java | 12 +++++----- 5 files changed, 25 insertions(+), 26 deletions(-) rename backend/src/main/java/corea/{cotroller => room}/RoomController.java (97%) diff --git a/backend/src/main/java/corea/DataInitializer.java b/backend/src/main/java/corea/DataInitializer.java index 2d1291d51..9999c9d8d 100644 --- a/backend/src/main/java/corea/DataInitializer.java +++ b/backend/src/main/java/corea/DataInitializer.java @@ -35,12 +35,14 @@ public void run(final String... args) throws Exception { final Room room = new Room( "레이싱 카와 함께하는 TDD", - members.get(0) - .getId(), + "TDD를 배우고 싶은 자 나에게로", + members.get(0).getId(), "https://github.com/jcoding-play/java-racingcar", "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAK8AuwMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAEAgMFBgcBAAj/xABTEAACAQMBAggHCQwHBwUAAAABAgMABBEFEiEGEyIxQVFh0QcUcYHB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ghubPXvxTkF3rTSwq1rFsE8osuwQuef353jfu6efI97WKHhp4QYSNjVJnx0NbQEH6qXH4SvCHCw24LaRQcnNsvK7DgimEpgPhBtrSbwh67HPNBARLGV29xYGJTu3/AM5qLi0nQ0/3i9iLH4LhfTQvCY6rwk1661i70+K3uLgqWCS8kFVVd28nor1svCO3QCHWXt9nmKXDqR51HprpjxKjFJxRGWDU7sj+EVtp8N9H9yn45GTL8raAOevyUdoHDPWuDsnG2U4eM8lo7gF0cdRG7I89cuNK1C9nFxqGsJcTEbJeWWRzgdBJ304mgxAk8ZY+cSN9rVCctTtIpyk0r3oe1rhjaarJHLHpjWjJ7xElBEbdOw2AwXpwScfNivy6gzuWSJUU8wMhqcbg7byrhp7VT1xJs4+djSP6K2fTeN9JanGOnpZ15eIyZElKnXelf2urZaeJi6Y8fP3V7iYPg4/So8W/TgnyVwwfFYfpCmIAIig6M+ZlrvFR9G2D2OO+izDu/C+ekmHHON389tAA/Er8KQ+evcQvXIPLmiOKTqrnFR0AMcQvwm+ia94uvQ+PKKf4qL+f9K7xQA3McUACmD+9WucQeiRT56L4sD8NhXNkfjSf0aABeIb4SmuG2c82zROyPhjzrXQmThTGT8k0ABG1k6QppBs2PPGp7KkeIk+Cnmr3EuOdB9KgCN8TI3iBR81dFs45o1FSQjb8X+9XuKf8WR5G9tAEabeTpVx5GNcNu3959I1J8WwGSrAeUUkjHSw+agCLMDdcg8p9tIMDfDceTFS4GTjaau7HxvnFAEKYGx98kPzd1c4hvhOfKtTRTrZfo1wxr0bPzUBRCGBusDyp7aTxLfCX6I76nOK+KvmPsr3FfE/eoMo//9k=", 3, "TDD", + 15, + 20, LocalDateTime.now() .plusDays(7), LocalDateTime.now() @@ -50,15 +52,15 @@ public void run(final String... args) throws Exception { participationRepository.saveAll( List.of( - new Participation(room.getId(),members.get(0).getId()), - new Participation(room.getId(),members.get(1).getId()), - new Participation(room.getId(),members.get(2).getId()), - new Participation(room.getId(),members.get(3).getId()), - new Participation(room.getId(),members.get(4).getId()), - new Participation(room.getId(),members.get(5).getId()), - new Participation(room.getId(),members.get(6).getId()), - new Participation(room.getId(),members.get(7).getId()) + new Participation(room.getId(), members.get(0).getId()), + new Participation(room.getId(), members.get(1).getId()), + new Participation(room.getId(), members.get(2).getId()), + new Participation(room.getId(), members.get(3).getId()), + new Participation(room.getId(), members.get(4).getId()), + new Participation(room.getId(), members.get(5).getId()), + new Participation(room.getId(), members.get(6).getId()), + new Participation(room.getId(), members.get(7).getId()) - )); + )); } } diff --git a/backend/src/main/java/corea/cotroller/RoomController.java b/backend/src/main/java/corea/room/RoomController.java similarity index 97% rename from backend/src/main/java/corea/cotroller/RoomController.java rename to backend/src/main/java/corea/room/RoomController.java index 2758e088b..b316ba60f 100644 --- a/backend/src/main/java/corea/cotroller/RoomController.java +++ b/backend/src/main/java/corea/room/RoomController.java @@ -1,4 +1,4 @@ -package corea.cotroller; +package corea.room; import corea.dto.RoomResponse; import corea.dto.RoomResponses; diff --git a/backend/src/test/java/corea/fixture/MemberFixture.java b/backend/src/test/java/corea/fixture/MemberFixture.java index 48de7d33b..734cef414 100644 --- a/backend/src/test/java/corea/fixture/MemberFixture.java +++ b/backend/src/test/java/corea/fixture/MemberFixture.java @@ -5,6 +5,6 @@ public class MemberFixture { public static Member MEMBER_PORORO() { - return new Member("pororo@gmail.com"); + return new Member("pororo@gmail.com", "뽀로로"); } } diff --git a/backend/src/test/java/corea/member/domain/MatchingTest.java b/backend/src/test/java/corea/member/domain/MatchingTest.java index 503847ecb..c4eeb3b13 100644 --- a/backend/src/test/java/corea/member/domain/MatchingTest.java +++ b/backend/src/test/java/corea/member/domain/MatchingTest.java @@ -1,9 +1,9 @@ package corea.member.domain; -import corea.domain.Member; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -16,12 +16,9 @@ class MatchingTest { @Test @DisplayName("멤버 리스트를 받아서 매칭 결과를 반환한다.") void matchGroup() { - List members = List.of( - new Member(1L, "test1@email.com"), - new Member(2L, "test2@email.com"), - new Member(3L, "test3@email.com"), - new Member(4L, "test4@email.com") - ); + ArrayList members = new ArrayList<>(List.of( + 1L, 2L, 3L, 4L + )); int matchingSize = 2; Map> results = matching.matchGroup(members, matchingSize); diff --git a/backend/src/test/java/corea/member/service/MatchingServiceTest.java b/backend/src/test/java/corea/member/service/MatchingServiceTest.java index 2f7ce4885..5fd6e1d15 100644 --- a/backend/src/test/java/corea/member/service/MatchingServiceTest.java +++ b/backend/src/test/java/corea/member/service/MatchingServiceTest.java @@ -1,7 +1,7 @@ package corea.member.service; import config.ServiceTest; -import corea.domain.Member; +import corea.domain.Participation; import corea.member.repository.MatchedGroupRepository; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -23,11 +23,11 @@ class MatchingServiceTest { @Test @DisplayName("멤버 리스트를 받아 매칭 결과를 반환한다.") void matchMaking() { - List members = List.of( - new Member(1L, "test1@email.com"), - new Member(2L, "test2@email.com"), - new Member(3L, "test3@email.com"), - new Member(4L, "test4@email.com") + List members = List.of( + new Participation(1, 1), + new Participation(1, 2), + new Participation(1, 3), + new Participation(1, 4) ); int matchingSize = 2; From 571a4f2e485e7ecedf50714ba3c0460ab804fc1e Mon Sep 17 00:00:00 2001 From: gyungchan Jo Date: Tue, 16 Jul 2024 12:25:24 +0900 Subject: [PATCH 2/2] =?UTF-8?q?config:=20CORS=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/corea/WebConfig.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 backend/src/main/java/corea/WebConfig.java diff --git a/backend/src/main/java/corea/WebConfig.java b/backend/src/main/java/corea/WebConfig.java new file mode 100644 index 000000000..0d37ed958 --- /dev/null +++ b/backend/src/main/java/corea/WebConfig.java @@ -0,0 +1,18 @@ +package corea; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class WebConfig implements WebMvcConfigurer { + + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("http://localhost:8080", "http://localhost:8081") + .allowedMethods("GET", "POST", "DELETE") + .allowCredentials(true) + .maxAge(3000); + } +}