From 1306c7b6bb56ce39c40413d148c3ce815b9615e7 Mon Sep 17 00:00:00 2001 From: Hyeonji <110809927+skylar1220@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:43:58 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20review=20group=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EB=90=98=EB=8A=94=20=EC=98=88=EC=99=B8=20?= =?UTF-8?q?=ED=8C=A8=ED=82=A4=EC=A7=80=20=EC=9D=B4=EB=8F=99=20(#999)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - review 패키지에서 사용되는 예외도 있으나, review가 reviewGroup을 의존하는 것이 반대의 경우보다 자연스럽기때문에 이동 --- .../java/reviewme/review/service/mapper/ReviewMapper.java | 2 +- .../main/java/reviewme/reviewgroup/domain/ReviewGroup.java | 4 ++-- .../domain/exception/InvalidProjectNameLengthException.java | 2 +- .../domain/exception/InvalidRevieweeNameLengthException.java | 2 +- .../reviewgroup/service/ReviewGroupLookupService.java | 2 +- .../java/reviewme/reviewgroup/service/ReviewGroupService.java | 4 ++-- .../ReviewGroupNotFoundByReviewRequestCodeException.java | 2 +- .../service/exception/ReviewGroupUnauthorizedException.java | 2 +- backend/src/test/java/reviewme/api/ReviewApiTest.java | 2 +- backend/src/test/java/reviewme/api/TemplateApiTest.java | 2 +- .../java/reviewme/review/service/mapper/ReviewMapperTest.java | 2 +- .../reviewgroup/service/ReviewGroupLookupServiceTest.java | 2 +- .../reviewme/reviewgroup/service/ReviewGroupServiceTest.java | 4 ++-- 13 files changed, 16 insertions(+), 16 deletions(-) rename backend/src/main/java/reviewme/{review => reviewgroup}/domain/exception/InvalidProjectNameLengthException.java (92%) rename backend/src/main/java/reviewme/{review => reviewgroup}/domain/exception/InvalidRevieweeNameLengthException.java (92%) rename backend/src/main/java/reviewme/{review => reviewgroup}/service/exception/ReviewGroupNotFoundByReviewRequestCodeException.java (90%) rename backend/src/main/java/reviewme/{review => reviewgroup}/service/exception/ReviewGroupUnauthorizedException.java (92%) diff --git a/backend/src/main/java/reviewme/review/service/mapper/ReviewMapper.java b/backend/src/main/java/reviewme/review/service/mapper/ReviewMapper.java index 499a5ea19..0db3362ae 100644 --- a/backend/src/main/java/reviewme/review/service/mapper/ReviewMapper.java +++ b/backend/src/main/java/reviewme/review/service/mapper/ReviewMapper.java @@ -14,7 +14,7 @@ import reviewme.review.domain.Review; import reviewme.review.service.dto.request.ReviewAnswerRequest; import reviewme.review.service.dto.request.ReviewRegisterRequest; -import reviewme.review.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; +import reviewme.reviewgroup.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; import reviewme.review.service.exception.SubmittedQuestionNotFoundException; import reviewme.reviewgroup.domain.ReviewGroup; import reviewme.reviewgroup.repository.ReviewGroupRepository; diff --git a/backend/src/main/java/reviewme/reviewgroup/domain/ReviewGroup.java b/backend/src/main/java/reviewme/reviewgroup/domain/ReviewGroup.java index dcc97fefe..6e95967bd 100644 --- a/backend/src/main/java/reviewme/reviewgroup/domain/ReviewGroup.java +++ b/backend/src/main/java/reviewme/reviewgroup/domain/ReviewGroup.java @@ -11,8 +11,8 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; -import reviewme.review.domain.exception.InvalidProjectNameLengthException; -import reviewme.review.domain.exception.InvalidRevieweeNameLengthException; +import reviewme.reviewgroup.domain.exception.InvalidProjectNameLengthException; +import reviewme.reviewgroup.domain.exception.InvalidRevieweeNameLengthException; @Entity @Table(name = "review_group") diff --git a/backend/src/main/java/reviewme/review/domain/exception/InvalidProjectNameLengthException.java b/backend/src/main/java/reviewme/reviewgroup/domain/exception/InvalidProjectNameLengthException.java similarity index 92% rename from backend/src/main/java/reviewme/review/domain/exception/InvalidProjectNameLengthException.java rename to backend/src/main/java/reviewme/reviewgroup/domain/exception/InvalidProjectNameLengthException.java index 2e6386bb4..75b56ba43 100644 --- a/backend/src/main/java/reviewme/review/domain/exception/InvalidProjectNameLengthException.java +++ b/backend/src/main/java/reviewme/reviewgroup/domain/exception/InvalidProjectNameLengthException.java @@ -1,4 +1,4 @@ -package reviewme.review.domain.exception; +package reviewme.reviewgroup.domain.exception; import lombok.extern.slf4j.Slf4j; import reviewme.global.exception.BadRequestException; diff --git a/backend/src/main/java/reviewme/review/domain/exception/InvalidRevieweeNameLengthException.java b/backend/src/main/java/reviewme/reviewgroup/domain/exception/InvalidRevieweeNameLengthException.java similarity index 92% rename from backend/src/main/java/reviewme/review/domain/exception/InvalidRevieweeNameLengthException.java rename to backend/src/main/java/reviewme/reviewgroup/domain/exception/InvalidRevieweeNameLengthException.java index 27408d15b..e77562a23 100644 --- a/backend/src/main/java/reviewme/review/domain/exception/InvalidRevieweeNameLengthException.java +++ b/backend/src/main/java/reviewme/reviewgroup/domain/exception/InvalidRevieweeNameLengthException.java @@ -1,4 +1,4 @@ -package reviewme.review.domain.exception; +package reviewme.reviewgroup.domain.exception; import lombok.extern.slf4j.Slf4j; import reviewme.global.exception.BadRequestException; diff --git a/backend/src/main/java/reviewme/reviewgroup/service/ReviewGroupLookupService.java b/backend/src/main/java/reviewme/reviewgroup/service/ReviewGroupLookupService.java index 38bd711af..0567f6344 100644 --- a/backend/src/main/java/reviewme/reviewgroup/service/ReviewGroupLookupService.java +++ b/backend/src/main/java/reviewme/reviewgroup/service/ReviewGroupLookupService.java @@ -3,7 +3,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import reviewme.review.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; +import reviewme.reviewgroup.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; import reviewme.reviewgroup.domain.ReviewGroup; import reviewme.reviewgroup.repository.ReviewGroupRepository; import reviewme.reviewgroup.service.dto.ReviewGroupResponse; diff --git a/backend/src/main/java/reviewme/reviewgroup/service/ReviewGroupService.java b/backend/src/main/java/reviewme/reviewgroup/service/ReviewGroupService.java index 1ae76f6a0..86303197c 100644 --- a/backend/src/main/java/reviewme/reviewgroup/service/ReviewGroupService.java +++ b/backend/src/main/java/reviewme/reviewgroup/service/ReviewGroupService.java @@ -3,8 +3,8 @@ import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import reviewme.review.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; -import reviewme.review.service.exception.ReviewGroupUnauthorizedException; +import reviewme.reviewgroup.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; +import reviewme.reviewgroup.service.exception.ReviewGroupUnauthorizedException; import reviewme.reviewgroup.domain.ReviewGroup; import reviewme.reviewgroup.repository.ReviewGroupRepository; import reviewme.reviewgroup.service.dto.CheckValidAccessRequest; diff --git a/backend/src/main/java/reviewme/review/service/exception/ReviewGroupNotFoundByReviewRequestCodeException.java b/backend/src/main/java/reviewme/reviewgroup/service/exception/ReviewGroupNotFoundByReviewRequestCodeException.java similarity index 90% rename from backend/src/main/java/reviewme/review/service/exception/ReviewGroupNotFoundByReviewRequestCodeException.java rename to backend/src/main/java/reviewme/reviewgroup/service/exception/ReviewGroupNotFoundByReviewRequestCodeException.java index 121296482..5761e3c8d 100644 --- a/backend/src/main/java/reviewme/review/service/exception/ReviewGroupNotFoundByReviewRequestCodeException.java +++ b/backend/src/main/java/reviewme/reviewgroup/service/exception/ReviewGroupNotFoundByReviewRequestCodeException.java @@ -1,4 +1,4 @@ -package reviewme.review.service.exception; +package reviewme.reviewgroup.service.exception; import lombok.extern.slf4j.Slf4j; import reviewme.global.exception.NotFoundException; diff --git a/backend/src/main/java/reviewme/review/service/exception/ReviewGroupUnauthorizedException.java b/backend/src/main/java/reviewme/reviewgroup/service/exception/ReviewGroupUnauthorizedException.java similarity index 92% rename from backend/src/main/java/reviewme/review/service/exception/ReviewGroupUnauthorizedException.java rename to backend/src/main/java/reviewme/reviewgroup/service/exception/ReviewGroupUnauthorizedException.java index 125f2e7e9..64c106e84 100644 --- a/backend/src/main/java/reviewme/review/service/exception/ReviewGroupUnauthorizedException.java +++ b/backend/src/main/java/reviewme/reviewgroup/service/exception/ReviewGroupUnauthorizedException.java @@ -1,4 +1,4 @@ -package reviewme.review.service.exception; +package reviewme.reviewgroup.service.exception; import lombok.extern.slf4j.Slf4j; import reviewme.global.exception.UnauthorizedException; diff --git a/backend/src/test/java/reviewme/api/ReviewApiTest.java b/backend/src/test/java/reviewme/api/ReviewApiTest.java index 4552b02d5..e05935d43 100644 --- a/backend/src/test/java/reviewme/api/ReviewApiTest.java +++ b/backend/src/test/java/reviewme/api/ReviewApiTest.java @@ -34,7 +34,7 @@ import reviewme.review.service.dto.response.list.ReceivedReviewsSummaryResponse; import reviewme.review.service.dto.response.list.ReviewCategoryResponse; import reviewme.review.service.dto.response.list.ReviewListElementResponse; -import reviewme.review.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; +import reviewme.reviewgroup.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; class ReviewApiTest extends ApiTest { diff --git a/backend/src/test/java/reviewme/api/TemplateApiTest.java b/backend/src/test/java/reviewme/api/TemplateApiTest.java index 932039bac..e41e746cd 100644 --- a/backend/src/test/java/reviewme/api/TemplateApiTest.java +++ b/backend/src/test/java/reviewme/api/TemplateApiTest.java @@ -17,7 +17,7 @@ import org.springframework.restdocs.mockmvc.RestDocumentationResultHandler; import org.springframework.restdocs.payload.FieldDescriptor; import org.springframework.restdocs.request.ParameterDescriptor; -import reviewme.review.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; +import reviewme.reviewgroup.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; import reviewme.template.service.dto.response.SectionNameResponse; import reviewme.template.service.dto.response.SectionNamesResponse; diff --git a/backend/src/test/java/reviewme/review/service/mapper/ReviewMapperTest.java b/backend/src/test/java/reviewme/review/service/mapper/ReviewMapperTest.java index 2a624ccf5..146c6d7bb 100644 --- a/backend/src/test/java/reviewme/review/service/mapper/ReviewMapperTest.java +++ b/backend/src/test/java/reviewme/review/service/mapper/ReviewMapperTest.java @@ -20,7 +20,7 @@ import reviewme.review.domain.TextAnswer; import reviewme.review.service.dto.request.ReviewAnswerRequest; import reviewme.review.service.dto.request.ReviewRegisterRequest; -import reviewme.review.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; +import reviewme.reviewgroup.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; import reviewme.reviewgroup.domain.ReviewGroup; import reviewme.reviewgroup.repository.ReviewGroupRepository; import reviewme.support.ServiceTest; diff --git a/backend/src/test/java/reviewme/reviewgroup/service/ReviewGroupLookupServiceTest.java b/backend/src/test/java/reviewme/reviewgroup/service/ReviewGroupLookupServiceTest.java index a7719e52f..4c553a9a3 100644 --- a/backend/src/test/java/reviewme/reviewgroup/service/ReviewGroupLookupServiceTest.java +++ b/backend/src/test/java/reviewme/reviewgroup/service/ReviewGroupLookupServiceTest.java @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import reviewme.review.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; +import reviewme.reviewgroup.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; import reviewme.reviewgroup.domain.ReviewGroup; import reviewme.reviewgroup.repository.ReviewGroupRepository; import reviewme.reviewgroup.service.dto.ReviewGroupResponse; diff --git a/backend/src/test/java/reviewme/reviewgroup/service/ReviewGroupServiceTest.java b/backend/src/test/java/reviewme/reviewgroup/service/ReviewGroupServiceTest.java index 6bdc22f44..83b399682 100644 --- a/backend/src/test/java/reviewme/reviewgroup/service/ReviewGroupServiceTest.java +++ b/backend/src/test/java/reviewme/reviewgroup/service/ReviewGroupServiceTest.java @@ -17,8 +17,8 @@ import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; -import reviewme.review.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; -import reviewme.review.service.exception.ReviewGroupUnauthorizedException; +import reviewme.reviewgroup.service.exception.ReviewGroupNotFoundByReviewRequestCodeException; +import reviewme.reviewgroup.service.exception.ReviewGroupUnauthorizedException; import reviewme.reviewgroup.domain.ReviewGroup; import reviewme.reviewgroup.repository.ReviewGroupRepository; import reviewme.reviewgroup.service.dto.CheckValidAccessRequest;