From 946facefa57b84d458ab9ca7efdc09fd4a27f7de Mon Sep 17 00:00:00 2001 From: sohyundoh Date: Tue, 20 Aug 2024 17:00:52 +0900 Subject: [PATCH 1/2] =?UTF-8?q?#499=20[chore]=20dto=20=ED=8F=B4=EB=8D=94?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/comment/CommentController.java | 2 +- .../comment/CommentControllerSwagger.java | 2 +- .../mile/controller/moim/MoimController.java | 46 +++++++++---------- .../moim/MoimControllerSwagger.java | 42 ++++++++--------- .../mile/controller/post/PostController.java | 22 ++++----- .../post/PostControllerSwagger.java | 22 ++++----- .../controller/topic/TopicController.java | 6 +-- .../topic/TopicControllerSwagger.java | 6 +-- .../mile/controller/user/UserController.java | 2 +- .../user/UserControllerSwagger.java | 2 +- .../controller/user/facade/AuthFacade.java | 2 +- .../writername/WriterNameController.java | 4 +- .../WriterNameControllerSwagger.java | 4 +- .../cocurrency/DuplicatedInterceptorTest.java | 8 ++-- .../mile/cocurrency/UniqueNameLockTest.java | 2 +- .../mile/controller/MoimControllerTest.java | 8 ++-- .../java/com/mile/comment/domain/Comment.java | 2 +- .../mile/comment/service/CommentCreator.java | 2 +- .../mile/comment/service/CommentService.java | 2 +- .../comment/service/dto/CommentResponse.java | 2 +- .../service/CommentReplyCreator.java | 2 +- .../service/CommentReplyRetriever.java | 3 +- .../service/CommentReplyService.java | 4 +- .../dto/{ => request}/ReplyCreateRequest.java | 2 +- .../dto/{ => response}/ReplyResponse.java | 6 +-- .../main/java/com/mile/moim/domain/Moim.java | 5 +- .../com/mile/moim/service/MoimCreator.java | 2 +- .../com/mile/moim/service/MoimService.java | 46 +++++++++---------- .../dto/{ => request}/MoimCreateRequest.java | 2 +- .../{ => request}/MoimInfoModifyRequest.java | 2 +- .../dto/{ => request}/TopicCreateRequest.java | 3 +- .../WriterMemberJoinRequest.java | 3 +- .../{ => response}/BestMoimInfoResponse.java | 2 +- .../{ => response}/BestMoimListResponse.java | 4 +- .../{ => response}/BestMoimPostResponse.java | 2 +- .../{ => response}/ContentListResponse.java | 4 +- .../InvitationCodeGetResponse.java | 2 +- .../MoimAuthenticateResponse.java | 2 +- .../{ => response}/MoimCreateResponse.java | 2 +- .../MoimCuriousPostListResponse.java | 2 +- .../{ => response}/MoimInfoOwnerResponse.java | 2 +- .../dto/{ => response}/MoimInfoResponse.java | 2 +- .../MoimInvitationInfoResponse.java | 2 +- .../MoimListOfUserResponse.java | 2 +- .../MoimMostCuriousPostResponse.java | 2 +- .../MoimNameConflictCheckResponse.java | 2 +- .../{ => response}/MoimOfUserResponse.java | 2 +- .../MoimPublicStatusResponse.java | 2 +- .../MoimTopicInfoListResponse.java | 2 +- .../{ => response}/MoimTopicInfoResponse.java | 2 +- .../dto/{ => response}/MoimTopicResponse.java | 2 +- .../MoimWriterNameListGetResponse.java | 4 +- .../PopularWriterListResponse.java | 4 +- .../TemporaryPostExistResponse.java | 2 +- .../dto/{ => response}/TopicListResponse.java | 4 +- .../WriterNameConflictCheckResponse.java | 2 +- .../main/java/com/mile/post/domain/Post.java | 2 +- .../com/mile/post/service/PostCreator.java | 4 +- .../com/mile/post/service/PostRetriever.java | 4 +- .../com/mile/post/service/PostService.java | 24 +++++----- .../com/mile/post/service/PostUpdator.java | 3 +- .../{ => request}/CommentCreateRequest.java | 2 +- .../dto/{ => request}/PostCreateRequest.java | 3 +- .../dto/{ => request}/PostPutRequest.java | 3 +- .../TemporaryPostCreateRequest.java | 3 +- .../{ => response}/CommentListResponse.java | 2 +- .../{ => response}/ModifyPostGetResponse.java | 4 +- .../PostAuthenticateResponse.java | 2 +- .../{ => response}/PostCuriousResponse.java | 2 +- .../dto/{ => response}/PostGetResponse.java | 2 +- .../dto/{ => response}/PostListResponse.java | 2 +- .../TemporaryPostGetResponse.java | 4 +- .../TemporaryPostTopicGetResponse.java | 2 +- .../java/com/mile/topic/domain/Topic.java | 4 +- .../com/mile/topic/service/TopicCreator.java | 2 +- .../mile/topic/service/TopicRetriever.java | 19 ++++---- .../com/mile/topic/service/TopicService.java | 12 ++--- .../com/mile/topic/service/TopicUpdator.java | 2 +- .../dto/{ => request}/TopicPutRequest.java | 2 +- .../dto/{ => response}/ContentResponse.java | 2 +- .../ContentWithIsSelectedResponse.java | 2 +- .../PostListInTopicResponse.java | 4 +- .../{ => response}/TopicDetailResponse.java | 2 +- .../{ => response}/TopicOfMoimResponse.java | 2 +- .../dto/{ => response}/TopicResponse.java | 2 +- .../com/mile/user/service/UserService.java | 4 +- .../mile/writername/domain/WriterName.java | 4 +- .../writername/service/WriterNameCreator.java | 2 +- .../service/WriterNameRetriever.java | 3 +- .../writername/service/WriterNameService.java | 11 ++--- .../WriterNameDescriptionUpdateRequest.java | 2 +- .../{ => response}/PopularWriterResponse.java | 2 +- .../WriterNameDescriptionResponse.java | 2 +- .../WriterNameInfoResponse.java | 2 +- .../{ => response}/WriterNameResponse.java | 2 +- .../WriterNameShortResponse.java | 2 +- 96 files changed, 233 insertions(+), 252 deletions(-) rename module-domain/src/main/java/com/mile/commentreply/service/dto/{ => request}/ReplyCreateRequest.java (89%) rename module-domain/src/main/java/com/mile/commentreply/service/dto/{ => response}/ReplyResponse.java (89%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => request}/MoimCreateRequest.java (97%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => request}/MoimInfoModifyRequest.java (93%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => request}/TopicCreateRequest.java (92%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => request}/WriterMemberJoinRequest.java (89%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/BestMoimInfoResponse.java (92%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/BestMoimListResponse.java (90%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/BestMoimPostResponse.java (96%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/ContentListResponse.java (71%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/InvitationCodeGetResponse.java (85%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimAuthenticateResponse.java (86%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimCreateResponse.java (85%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimCuriousPostListResponse.java (87%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimInfoOwnerResponse.java (89%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimInfoResponse.java (92%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimInvitationInfoResponse.java (93%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimListOfUserResponse.java (86%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimMostCuriousPostResponse.java (95%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimNameConflictCheckResponse.java (84%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimOfUserResponse.java (87%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimPublicStatusResponse.java (83%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimTopicInfoListResponse.java (92%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimTopicInfoResponse.java (93%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimTopicResponse.java (81%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/MoimWriterNameListGetResponse.java (80%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/PopularWriterListResponse.java (80%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/TemporaryPostExistResponse.java (88%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/TopicListResponse.java (69%) rename module-domain/src/main/java/com/mile/moim/service/dto/{ => response}/WriterNameConflictCheckResponse.java (83%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => request}/CommentCreateRequest.java (93%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => request}/PostCreateRequest.java (93%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => request}/PostPutRequest.java (93%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => request}/TemporaryPostCreateRequest.java (92%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => response}/CommentListResponse.java (88%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => response}/ModifyPostGetResponse.java (83%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => response}/PostAuthenticateResponse.java (82%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => response}/PostCuriousResponse.java (80%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => response}/PostGetResponse.java (96%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => response}/PostListResponse.java (97%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => response}/TemporaryPostGetResponse.java (83%) rename module-domain/src/main/java/com/mile/post/service/dto/{ => response}/TemporaryPostTopicGetResponse.java (86%) rename module-domain/src/main/java/com/mile/topic/service/dto/{ => request}/TopicPutRequest.java (93%) rename module-domain/src/main/java/com/mile/topic/service/dto/{ => response}/ContentResponse.java (86%) rename module-domain/src/main/java/com/mile/topic/service/dto/{ => response}/ContentWithIsSelectedResponse.java (89%) rename module-domain/src/main/java/com/mile/topic/service/dto/{ => response}/PostListInTopicResponse.java (80%) rename module-domain/src/main/java/com/mile/topic/service/dto/{ => response}/TopicDetailResponse.java (90%) rename module-domain/src/main/java/com/mile/topic/service/dto/{ => response}/TopicOfMoimResponse.java (86%) rename module-domain/src/main/java/com/mile/topic/service/dto/{ => response}/TopicResponse.java (84%) rename module-domain/src/main/java/com/mile/writername/service/dto/{ => request}/WriterNameDescriptionUpdateRequest.java (82%) rename module-domain/src/main/java/com/mile/writername/service/dto/{ => response}/PopularWriterResponse.java (84%) rename module-domain/src/main/java/com/mile/writername/service/dto/{ => response}/WriterNameDescriptionResponse.java (87%) rename module-domain/src/main/java/com/mile/writername/service/dto/{ => response}/WriterNameInfoResponse.java (91%) rename module-domain/src/main/java/com/mile/writername/service/dto/{ => response}/WriterNameResponse.java (84%) rename module-domain/src/main/java/com/mile/writername/service/dto/{ => response}/WriterNameShortResponse.java (86%) diff --git a/module-api/src/main/java/com/mile/controller/comment/CommentController.java b/module-api/src/main/java/com/mile/controller/comment/CommentController.java index ee5aeda2..ace713ab 100644 --- a/module-api/src/main/java/com/mile/controller/comment/CommentController.java +++ b/module-api/src/main/java/com/mile/controller/comment/CommentController.java @@ -2,7 +2,7 @@ import com.mile.comment.service.CommentService; -import com.mile.commentreply.service.dto.ReplyCreateRequest; +import com.mile.commentreply.service.dto.request.ReplyCreateRequest; import com.mile.common.resolver.comment.CommentIdPathVariable; import com.mile.common.resolver.reply.ReplyIdPathVariable; import com.mile.common.resolver.user.UserId; diff --git a/module-api/src/main/java/com/mile/controller/comment/CommentControllerSwagger.java b/module-api/src/main/java/com/mile/controller/comment/CommentControllerSwagger.java index e6b9d918..2c632e6e 100644 --- a/module-api/src/main/java/com/mile/controller/comment/CommentControllerSwagger.java +++ b/module-api/src/main/java/com/mile/controller/comment/CommentControllerSwagger.java @@ -1,6 +1,6 @@ package com.mile.controller.comment; -import com.mile.commentreply.service.dto.ReplyCreateRequest; +import com.mile.commentreply.service.dto.request.ReplyCreateRequest; import com.mile.common.resolver.user.UserId; import com.mile.dto.ErrorResponse; import com.mile.dto.SuccessResponse; diff --git a/module-api/src/main/java/com/mile/controller/moim/MoimController.java b/module-api/src/main/java/com/mile/controller/moim/MoimController.java index 19383378..222dcaa0 100644 --- a/module-api/src/main/java/com/mile/controller/moim/MoimController.java +++ b/module-api/src/main/java/com/mile/controller/moim/MoimController.java @@ -5,29 +5,29 @@ import com.mile.dto.SuccessResponse; import com.mile.exception.message.SuccessMessage; import com.mile.moim.service.MoimService; -import com.mile.moim.service.dto.BestMoimListResponse; -import com.mile.moim.service.dto.ContentListResponse; -import com.mile.moim.service.dto.InvitationCodeGetResponse; -import com.mile.moim.service.dto.MoimAuthenticateResponse; -import com.mile.moim.service.dto.MoimCreateRequest; -import com.mile.moim.service.dto.MoimCreateResponse; -import com.mile.moim.service.dto.MoimCuriousPostListResponse; -import com.mile.moim.service.dto.MoimInfoModifyRequest; -import com.mile.moim.service.dto.MoimInfoOwnerResponse; -import com.mile.moim.service.dto.MoimInfoResponse; -import com.mile.moim.service.dto.MoimInvitationInfoResponse; -import com.mile.moim.service.dto.MoimNameConflictCheckResponse; -import com.mile.moim.service.dto.MoimPublicStatusResponse; -import com.mile.moim.service.dto.MoimTopicInfoListResponse; -import com.mile.moim.service.dto.MoimTopicResponse; -import com.mile.moim.service.dto.MoimWriterNameListGetResponse; -import com.mile.moim.service.dto.PopularWriterListResponse; -import com.mile.moim.service.dto.TemporaryPostExistResponse; -import com.mile.moim.service.dto.TopicCreateRequest; -import com.mile.moim.service.dto.TopicListResponse; -import com.mile.moim.service.dto.WriterMemberJoinRequest; -import com.mile.moim.service.dto.WriterNameConflictCheckResponse; -import com.mile.writername.service.dto.WriterNameShortResponse; +import com.mile.moim.service.dto.response.BestMoimListResponse; +import com.mile.moim.service.dto.response.ContentListResponse; +import com.mile.moim.service.dto.response.InvitationCodeGetResponse; +import com.mile.moim.service.dto.response.MoimAuthenticateResponse; +import com.mile.moim.service.dto.request.MoimCreateRequest; +import com.mile.moim.service.dto.response.MoimCreateResponse; +import com.mile.moim.service.dto.response.MoimCuriousPostListResponse; +import com.mile.moim.service.dto.request.MoimInfoModifyRequest; +import com.mile.moim.service.dto.response.MoimInfoOwnerResponse; +import com.mile.moim.service.dto.response.MoimInfoResponse; +import com.mile.moim.service.dto.response.MoimInvitationInfoResponse; +import com.mile.moim.service.dto.response.MoimNameConflictCheckResponse; +import com.mile.moim.service.dto.response.MoimPublicStatusResponse; +import com.mile.moim.service.dto.response.MoimTopicInfoListResponse; +import com.mile.moim.service.dto.response.MoimTopicResponse; +import com.mile.moim.service.dto.response.MoimWriterNameListGetResponse; +import com.mile.moim.service.dto.response.PopularWriterListResponse; +import com.mile.moim.service.dto.response.TemporaryPostExistResponse; +import com.mile.moim.service.dto.request.TopicCreateRequest; +import com.mile.moim.service.dto.response.TopicListResponse; +import com.mile.moim.service.dto.request.WriterMemberJoinRequest; +import com.mile.moim.service.dto.response.WriterNameConflictCheckResponse; +import com.mile.writername.service.dto.response.WriterNameShortResponse; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; diff --git a/module-api/src/main/java/com/mile/controller/moim/MoimControllerSwagger.java b/module-api/src/main/java/com/mile/controller/moim/MoimControllerSwagger.java index 7230aa02..aec51e01 100644 --- a/module-api/src/main/java/com/mile/controller/moim/MoimControllerSwagger.java +++ b/module-api/src/main/java/com/mile/controller/moim/MoimControllerSwagger.java @@ -4,27 +4,27 @@ import com.mile.common.resolver.user.UserId; import com.mile.dto.ErrorResponse; import com.mile.dto.SuccessResponse; -import com.mile.moim.service.dto.BestMoimListResponse; -import com.mile.moim.service.dto.ContentListResponse; -import com.mile.moim.service.dto.InvitationCodeGetResponse; -import com.mile.moim.service.dto.MoimCreateRequest; -import com.mile.moim.service.dto.MoimCreateResponse; -import com.mile.moim.service.dto.MoimCuriousPostListResponse; -import com.mile.moim.service.dto.MoimInfoModifyRequest; -import com.mile.moim.service.dto.MoimInfoOwnerResponse; -import com.mile.moim.service.dto.MoimInfoResponse; -import com.mile.moim.service.dto.MoimInvitationInfoResponse; -import com.mile.moim.service.dto.MoimNameConflictCheckResponse; -import com.mile.moim.service.dto.MoimTopicInfoListResponse; -import com.mile.moim.service.dto.MoimTopicResponse; -import com.mile.moim.service.dto.MoimWriterNameListGetResponse; -import com.mile.moim.service.dto.PopularWriterListResponse; -import com.mile.moim.service.dto.TemporaryPostExistResponse; -import com.mile.moim.service.dto.TopicCreateRequest; -import com.mile.moim.service.dto.TopicListResponse; -import com.mile.moim.service.dto.WriterMemberJoinRequest; -import com.mile.moim.service.dto.WriterNameConflictCheckResponse; -import com.mile.writername.service.dto.WriterNameShortResponse; +import com.mile.moim.service.dto.response.BestMoimListResponse; +import com.mile.moim.service.dto.response.ContentListResponse; +import com.mile.moim.service.dto.response.InvitationCodeGetResponse; +import com.mile.moim.service.dto.request.MoimCreateRequest; +import com.mile.moim.service.dto.response.MoimCreateResponse; +import com.mile.moim.service.dto.response.MoimCuriousPostListResponse; +import com.mile.moim.service.dto.request.MoimInfoModifyRequest; +import com.mile.moim.service.dto.response.MoimInfoOwnerResponse; +import com.mile.moim.service.dto.response.MoimInfoResponse; +import com.mile.moim.service.dto.response.MoimInvitationInfoResponse; +import com.mile.moim.service.dto.response.MoimNameConflictCheckResponse; +import com.mile.moim.service.dto.response.MoimTopicInfoListResponse; +import com.mile.moim.service.dto.response.MoimTopicResponse; +import com.mile.moim.service.dto.response.MoimWriterNameListGetResponse; +import com.mile.moim.service.dto.response.PopularWriterListResponse; +import com.mile.moim.service.dto.response.TemporaryPostExistResponse; +import com.mile.moim.service.dto.request.TopicCreateRequest; +import com.mile.moim.service.dto.response.TopicListResponse; +import com.mile.moim.service.dto.request.WriterMemberJoinRequest; +import com.mile.moim.service.dto.response.WriterNameConflictCheckResponse; +import com.mile.writername.service.dto.response.WriterNameShortResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.enums.ParameterIn; diff --git a/module-api/src/main/java/com/mile/controller/post/PostController.java b/module-api/src/main/java/com/mile/controller/post/PostController.java index 1bcc03c1..f397708d 100644 --- a/module-api/src/main/java/com/mile/controller/post/PostController.java +++ b/module-api/src/main/java/com/mile/controller/post/PostController.java @@ -5,18 +5,18 @@ import com.mile.dto.SuccessResponse; import com.mile.exception.message.SuccessMessage; import com.mile.post.service.PostService; -import com.mile.post.service.dto.CommentCreateRequest; -import com.mile.post.service.dto.CommentListResponse; -import com.mile.post.service.dto.ModifyPostGetResponse; -import com.mile.post.service.dto.PostAuthenticateResponse; -import com.mile.post.service.dto.PostCreateRequest; -import com.mile.post.service.dto.PostCuriousResponse; -import com.mile.post.service.dto.PostGetResponse; -import com.mile.post.service.dto.PostPutRequest; -import com.mile.post.service.dto.TemporaryPostCreateRequest; -import com.mile.post.service.dto.TemporaryPostGetResponse; +import com.mile.post.service.dto.request.CommentCreateRequest; +import com.mile.post.service.dto.response.CommentListResponse; +import com.mile.post.service.dto.response.ModifyPostGetResponse; +import com.mile.post.service.dto.response.PostAuthenticateResponse; +import com.mile.post.service.dto.request.PostCreateRequest; +import com.mile.post.service.dto.response.PostCuriousResponse; +import com.mile.post.service.dto.response.PostGetResponse; +import com.mile.post.service.dto.request.PostPutRequest; +import com.mile.post.service.dto.request.TemporaryPostCreateRequest; +import com.mile.post.service.dto.response.TemporaryPostGetResponse; import com.mile.common.resolver.post.PostIdPathVariable; -import com.mile.writername.service.dto.WriterNameResponse; +import com.mile.writername.service.dto.response.WriterNameResponse; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; diff --git a/module-api/src/main/java/com/mile/controller/post/PostControllerSwagger.java b/module-api/src/main/java/com/mile/controller/post/PostControllerSwagger.java index 820f63ed..021cac42 100644 --- a/module-api/src/main/java/com/mile/controller/post/PostControllerSwagger.java +++ b/module-api/src/main/java/com/mile/controller/post/PostControllerSwagger.java @@ -4,17 +4,17 @@ import com.mile.curious.service.dto.CuriousInfoResponse; import com.mile.dto.ErrorResponse; import com.mile.dto.SuccessResponse; -import com.mile.post.service.dto.CommentCreateRequest; -import com.mile.post.service.dto.CommentListResponse; -import com.mile.post.service.dto.ModifyPostGetResponse; -import com.mile.post.service.dto.PostAuthenticateResponse; -import com.mile.post.service.dto.PostCreateRequest; -import com.mile.post.service.dto.PostCuriousResponse; -import com.mile.post.service.dto.PostGetResponse; -import com.mile.post.service.dto.PostPutRequest; -import com.mile.post.service.dto.TemporaryPostCreateRequest; -import com.mile.post.service.dto.TemporaryPostGetResponse; -import com.mile.writername.service.dto.WriterNameResponse; +import com.mile.post.service.dto.request.CommentCreateRequest; +import com.mile.post.service.dto.response.CommentListResponse; +import com.mile.post.service.dto.response.ModifyPostGetResponse; +import com.mile.post.service.dto.response.PostAuthenticateResponse; +import com.mile.post.service.dto.request.PostCreateRequest; +import com.mile.post.service.dto.response.PostCuriousResponse; +import com.mile.post.service.dto.response.PostGetResponse; +import com.mile.post.service.dto.request.PostPutRequest; +import com.mile.post.service.dto.request.TemporaryPostCreateRequest; +import com.mile.post.service.dto.response.TemporaryPostGetResponse; +import com.mile.writername.service.dto.response.WriterNameResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.enums.ParameterIn; diff --git a/module-api/src/main/java/com/mile/controller/topic/TopicController.java b/module-api/src/main/java/com/mile/controller/topic/TopicController.java index 0b2d37e7..7db4a404 100644 --- a/module-api/src/main/java/com/mile/controller/topic/TopicController.java +++ b/module-api/src/main/java/com/mile/controller/topic/TopicController.java @@ -5,9 +5,9 @@ import com.mile.exception.message.SuccessMessage; import com.mile.common.resolver.topic.TopicIdPathVariable; import com.mile.topic.service.TopicService; -import com.mile.topic.service.dto.PostListInTopicResponse; -import com.mile.topic.service.dto.TopicDetailResponse; -import com.mile.topic.service.dto.TopicPutRequest; +import com.mile.topic.service.dto.response.PostListInTopicResponse; +import com.mile.topic.service.dto.response.TopicDetailResponse; +import com.mile.topic.service.dto.request.TopicPutRequest; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; diff --git a/module-api/src/main/java/com/mile/controller/topic/TopicControllerSwagger.java b/module-api/src/main/java/com/mile/controller/topic/TopicControllerSwagger.java index 5e54f481..e76194c1 100644 --- a/module-api/src/main/java/com/mile/controller/topic/TopicControllerSwagger.java +++ b/module-api/src/main/java/com/mile/controller/topic/TopicControllerSwagger.java @@ -4,9 +4,9 @@ import com.mile.common.resolver.user.UserId; import com.mile.dto.ErrorResponse; import com.mile.dto.SuccessResponse; -import com.mile.topic.service.dto.PostListInTopicResponse; -import com.mile.topic.service.dto.TopicDetailResponse; -import com.mile.topic.service.dto.TopicPutRequest; +import com.mile.topic.service.dto.response.PostListInTopicResponse; +import com.mile.topic.service.dto.response.TopicDetailResponse; +import com.mile.topic.service.dto.request.TopicPutRequest; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.enums.ParameterIn; diff --git a/module-api/src/main/java/com/mile/controller/user/UserController.java b/module-api/src/main/java/com/mile/controller/user/UserController.java index 619da627..acccb26c 100644 --- a/module-api/src/main/java/com/mile/controller/user/UserController.java +++ b/module-api/src/main/java/com/mile/controller/user/UserController.java @@ -5,7 +5,7 @@ import com.mile.controller.user.facade.AuthFacade; import com.mile.dto.SuccessResponse; import com.mile.exception.message.SuccessMessage; -import com.mile.moim.service.dto.MoimListOfUserResponse; +import com.mile.moim.service.dto.response.MoimListOfUserResponse; import com.mile.user.service.dto.AccessTokenGetSuccess; import com.mile.user.service.dto.LoginSuccessResponse; import jakarta.servlet.http.Cookie; diff --git a/module-api/src/main/java/com/mile/controller/user/UserControllerSwagger.java b/module-api/src/main/java/com/mile/controller/user/UserControllerSwagger.java index c7b48e5e..eb101264 100644 --- a/module-api/src/main/java/com/mile/controller/user/UserControllerSwagger.java +++ b/module-api/src/main/java/com/mile/controller/user/UserControllerSwagger.java @@ -4,7 +4,7 @@ import com.mile.common.resolver.user.UserId; import com.mile.dto.ErrorResponse; import com.mile.dto.SuccessResponse; -import com.mile.moim.service.dto.MoimListOfUserResponse; +import com.mile.moim.service.dto.response.MoimListOfUserResponse; import com.mile.user.service.dto.AccessTokenGetSuccess; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/module-api/src/main/java/com/mile/controller/user/facade/AuthFacade.java b/module-api/src/main/java/com/mile/controller/user/facade/AuthFacade.java index 93c7cbe3..28a5fb83 100644 --- a/module-api/src/main/java/com/mile/controller/user/facade/AuthFacade.java +++ b/module-api/src/main/java/com/mile/controller/user/facade/AuthFacade.java @@ -5,7 +5,7 @@ import com.mile.client.dto.UserLoginRequest; import com.mile.common.auth.JwtTokenProvider; import com.mile.jwt.service.TokenService; -import com.mile.moim.service.dto.MoimListOfUserResponse; +import com.mile.moim.service.dto.response.MoimListOfUserResponse; import com.mile.strategy.LoginStrategyManager; import com.mile.strategy.dto.UserInfoResponse; import com.mile.user.service.UserService; diff --git a/module-api/src/main/java/com/mile/controller/writername/WriterNameController.java b/module-api/src/main/java/com/mile/controller/writername/WriterNameController.java index 3f3a26ea..b6f547cb 100644 --- a/module-api/src/main/java/com/mile/controller/writername/WriterNameController.java +++ b/module-api/src/main/java/com/mile/controller/writername/WriterNameController.java @@ -4,8 +4,8 @@ import com.mile.dto.SuccessResponse; import com.mile.exception.message.SuccessMessage; import com.mile.writername.service.WriterNameService; -import com.mile.writername.service.dto.WriterNameDescriptionResponse; -import com.mile.writername.service.dto.WriterNameDescriptionUpdateRequest; +import com.mile.writername.service.dto.response.WriterNameDescriptionResponse; +import com.mile.writername.service.dto.request.WriterNameDescriptionUpdateRequest; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; diff --git a/module-api/src/main/java/com/mile/controller/writername/WriterNameControllerSwagger.java b/module-api/src/main/java/com/mile/controller/writername/WriterNameControllerSwagger.java index 421abfed..d176be98 100644 --- a/module-api/src/main/java/com/mile/controller/writername/WriterNameControllerSwagger.java +++ b/module-api/src/main/java/com/mile/controller/writername/WriterNameControllerSwagger.java @@ -3,8 +3,8 @@ import com.mile.common.resolver.user.UserId; import com.mile.dto.ErrorResponse; import com.mile.dto.SuccessResponse; -import com.mile.writername.service.dto.WriterNameDescriptionResponse; -import com.mile.writername.service.dto.WriterNameDescriptionUpdateRequest; +import com.mile.writername.service.dto.response.WriterNameDescriptionResponse; +import com.mile.writername.service.dto.request.WriterNameDescriptionUpdateRequest; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/module-api/src/test/java/com/mile/cocurrency/DuplicatedInterceptorTest.java b/module-api/src/test/java/com/mile/cocurrency/DuplicatedInterceptorTest.java index da1c9680..3b04fbbe 100644 --- a/module-api/src/test/java/com/mile/cocurrency/DuplicatedInterceptorTest.java +++ b/module-api/src/test/java/com/mile/cocurrency/DuplicatedInterceptorTest.java @@ -5,10 +5,10 @@ import com.mile.common.auth.JwtTokenProvider; import com.mile.moim.domain.Moim; import com.mile.moim.repository.MoimRepository; -import com.mile.moim.service.dto.MoimCreateRequest; -import com.mile.moim.service.dto.TopicCreateRequest; -import com.mile.moim.service.dto.WriterMemberJoinRequest; -import com.mile.post.service.dto.PostCreateRequest; +import com.mile.moim.service.dto.request.MoimCreateRequest; +import com.mile.moim.service.dto.request.TopicCreateRequest; +import com.mile.moim.service.dto.request.WriterMemberJoinRequest; +import com.mile.post.service.dto.request.PostCreateRequest; import com.mile.topic.domain.Topic; import com.mile.topic.repository.TopicRepository; import com.mile.user.domain.User; diff --git a/module-api/src/test/java/com/mile/cocurrency/UniqueNameLockTest.java b/module-api/src/test/java/com/mile/cocurrency/UniqueNameLockTest.java index eaa26f87..65f7efe1 100644 --- a/module-api/src/test/java/com/mile/cocurrency/UniqueNameLockTest.java +++ b/module-api/src/test/java/com/mile/cocurrency/UniqueNameLockTest.java @@ -3,7 +3,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.mile.client.SocialType; import com.mile.common.auth.JwtTokenProvider; -import com.mile.moim.service.dto.MoimCreateRequest; +import com.mile.moim.service.dto.request.MoimCreateRequest; import com.mile.user.domain.User; import com.mile.user.repository.UserRepository; import org.junit.jupiter.api.DisplayName; diff --git a/module-api/src/test/java/com/mile/controller/MoimControllerTest.java b/module-api/src/test/java/com/mile/controller/MoimControllerTest.java index 3e33e32f..8fa4745e 100644 --- a/module-api/src/test/java/com/mile/controller/MoimControllerTest.java +++ b/module-api/src/test/java/com/mile/controller/MoimControllerTest.java @@ -7,10 +7,10 @@ import com.mile.moim.domain.Moim; import com.mile.moim.repository.MoimRepository; import com.mile.moim.service.MoimService; -import com.mile.moim.service.dto.MoimCreateRequest; -import com.mile.moim.service.dto.MoimInfoModifyRequest; -import com.mile.moim.service.dto.TopicCreateRequest; -import com.mile.moim.service.dto.WriterMemberJoinRequest; +import com.mile.moim.service.dto.request.MoimCreateRequest; +import com.mile.moim.service.dto.request.MoimInfoModifyRequest; +import com.mile.moim.service.dto.request.TopicCreateRequest; +import com.mile.moim.service.dto.request.WriterMemberJoinRequest; import com.mile.topic.domain.Topic; import com.mile.topic.repository.TopicRepository; import com.mile.user.domain.User; diff --git a/module-domain/src/main/java/com/mile/comment/domain/Comment.java b/module-domain/src/main/java/com/mile/comment/domain/Comment.java index ea3313c9..4ea07b00 100644 --- a/module-domain/src/main/java/com/mile/comment/domain/Comment.java +++ b/module-domain/src/main/java/com/mile/comment/domain/Comment.java @@ -2,7 +2,7 @@ import com.mile.config.BaseTimeEntity; import com.mile.post.domain.Post; -import com.mile.post.service.dto.CommentCreateRequest; +import com.mile.post.service.dto.request.CommentCreateRequest; import com.mile.writername.domain.WriterName; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/module-domain/src/main/java/com/mile/comment/service/CommentCreator.java b/module-domain/src/main/java/com/mile/comment/service/CommentCreator.java index 6f5b6795..e0975a3d 100644 --- a/module-domain/src/main/java/com/mile/comment/service/CommentCreator.java +++ b/module-domain/src/main/java/com/mile/comment/service/CommentCreator.java @@ -3,7 +3,7 @@ import com.mile.comment.domain.Comment; import com.mile.comment.repository.CommentRepository; import com.mile.post.domain.Post; -import com.mile.post.service.dto.CommentCreateRequest; +import com.mile.post.service.dto.request.CommentCreateRequest; import com.mile.utils.SecureUrlUtil; import com.mile.writername.domain.WriterName; import lombok.RequiredArgsConstructor; diff --git a/module-domain/src/main/java/com/mile/comment/service/CommentService.java b/module-domain/src/main/java/com/mile/comment/service/CommentService.java index a4958448..aaf6ddc6 100644 --- a/module-domain/src/main/java/com/mile/comment/service/CommentService.java +++ b/module-domain/src/main/java/com/mile/comment/service/CommentService.java @@ -4,7 +4,7 @@ import com.mile.comment.service.dto.CommentResponse; import com.mile.commentreply.service.CommentReplyRemover; import com.mile.commentreply.service.CommentReplyService; -import com.mile.commentreply.service.dto.ReplyCreateRequest; +import com.mile.commentreply.service.dto.request.ReplyCreateRequest; import com.mile.exception.message.ErrorMessage; import com.mile.exception.model.ForbiddenException; import com.mile.moim.service.MoimRetriever; diff --git a/module-domain/src/main/java/com/mile/comment/service/dto/CommentResponse.java b/module-domain/src/main/java/com/mile/comment/service/dto/CommentResponse.java index aea8ddb6..557399fe 100644 --- a/module-domain/src/main/java/com/mile/comment/service/dto/CommentResponse.java +++ b/module-domain/src/main/java/com/mile/comment/service/dto/CommentResponse.java @@ -1,7 +1,7 @@ package com.mile.comment.service.dto; import com.mile.comment.domain.Comment; -import com.mile.commentreply.service.dto.ReplyResponse; +import com.mile.commentreply.service.dto.response.ReplyResponse; import com.mile.writername.domain.WriterName; import java.util.List; diff --git a/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyCreator.java b/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyCreator.java index 2946a416..cb6141a7 100644 --- a/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyCreator.java +++ b/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyCreator.java @@ -3,7 +3,7 @@ import com.mile.comment.domain.Comment; import com.mile.commentreply.domain.CommentReply; import com.mile.commentreply.repository.CommentReplyRepository; -import com.mile.commentreply.service.dto.ReplyCreateRequest; +import com.mile.commentreply.service.dto.request.ReplyCreateRequest; import com.mile.utils.SecureUrlUtil; import com.mile.writername.domain.WriterName; import lombok.RequiredArgsConstructor; diff --git a/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyRetriever.java b/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyRetriever.java index 026de042..b2162935 100644 --- a/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyRetriever.java +++ b/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyRetriever.java @@ -3,10 +3,9 @@ import com.mile.comment.domain.Comment; import com.mile.commentreply.domain.CommentReply; import com.mile.commentreply.repository.CommentReplyRepository; -import com.mile.commentreply.service.dto.ReplyResponse; +import com.mile.commentreply.service.dto.response.ReplyResponse; import com.mile.exception.message.ErrorMessage; import com.mile.exception.model.NotFoundException; -import com.mile.exception.model.UnauthorizedException; import java.util.List; import java.util.stream.Collectors; diff --git a/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyService.java b/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyService.java index 4410751d..bd1cecf8 100644 --- a/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyService.java +++ b/module-domain/src/main/java/com/mile/commentreply/service/CommentReplyService.java @@ -2,8 +2,8 @@ import com.mile.comment.domain.Comment; import com.mile.commentreply.domain.CommentReply; -import com.mile.commentreply.service.dto.ReplyCreateRequest; -import com.mile.commentreply.service.dto.ReplyResponse; +import com.mile.commentreply.service.dto.request.ReplyCreateRequest; +import com.mile.commentreply.service.dto.response.ReplyResponse; import com.mile.exception.message.ErrorMessage; import com.mile.exception.model.ForbiddenException; import com.mile.moim.service.MoimRetriever; diff --git a/module-domain/src/main/java/com/mile/commentreply/service/dto/ReplyCreateRequest.java b/module-domain/src/main/java/com/mile/commentreply/service/dto/request/ReplyCreateRequest.java similarity index 89% rename from module-domain/src/main/java/com/mile/commentreply/service/dto/ReplyCreateRequest.java rename to module-domain/src/main/java/com/mile/commentreply/service/dto/request/ReplyCreateRequest.java index 93c4fa81..c6387790 100644 --- a/module-domain/src/main/java/com/mile/commentreply/service/dto/ReplyCreateRequest.java +++ b/module-domain/src/main/java/com/mile/commentreply/service/dto/request/ReplyCreateRequest.java @@ -1,4 +1,4 @@ -package com.mile.commentreply.service.dto; +package com.mile.commentreply.service.dto.request; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; diff --git a/module-domain/src/main/java/com/mile/commentreply/service/dto/ReplyResponse.java b/module-domain/src/main/java/com/mile/commentreply/service/dto/response/ReplyResponse.java similarity index 89% rename from module-domain/src/main/java/com/mile/commentreply/service/dto/ReplyResponse.java rename to module-domain/src/main/java/com/mile/commentreply/service/dto/response/ReplyResponse.java index cbb3eae2..cd5b522b 100644 --- a/module-domain/src/main/java/com/mile/commentreply/service/dto/ReplyResponse.java +++ b/module-domain/src/main/java/com/mile/commentreply/service/dto/response/ReplyResponse.java @@ -1,12 +1,8 @@ -package com.mile.commentreply.service.dto; +package com.mile.commentreply.service.dto.response; -import com.mile.comment.domain.Comment; -import com.mile.comment.service.dto.CommentResponse; import com.mile.commentreply.domain.CommentReply; import com.mile.writername.domain.WriterName; -import java.util.List; - public record ReplyResponse( String replyId, String name, diff --git a/module-domain/src/main/java/com/mile/moim/domain/Moim.java b/module-domain/src/main/java/com/mile/moim/domain/Moim.java index b39a594f..2dea1ab8 100644 --- a/module-domain/src/main/java/com/mile/moim/domain/Moim.java +++ b/module-domain/src/main/java/com/mile/moim/domain/Moim.java @@ -1,8 +1,8 @@ package com.mile.moim.domain; import com.mile.config.BaseTimeEntity; -import com.mile.moim.service.dto.MoimCreateRequest; -import com.mile.moim.service.dto.MoimInfoModifyRequest; +import com.mile.moim.service.dto.request.MoimCreateRequest; +import com.mile.moim.service.dto.request.MoimInfoModifyRequest; import com.mile.writername.domain.WriterName; import jakarta.persistence.CascadeType; import jakarta.persistence.Column; @@ -11,7 +11,6 @@ import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; -import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToOne; import jakarta.persistence.PrePersist; import jakarta.persistence.PreUpdate; diff --git a/module-domain/src/main/java/com/mile/moim/service/MoimCreator.java b/module-domain/src/main/java/com/mile/moim/service/MoimCreator.java index 77d43667..f465c260 100644 --- a/module-domain/src/main/java/com/mile/moim/service/MoimCreator.java +++ b/module-domain/src/main/java/com/mile/moim/service/MoimCreator.java @@ -2,7 +2,7 @@ import com.mile.moim.domain.Moim; import com.mile.moim.repository.MoimRepository; -import com.mile.moim.service.dto.MoimCreateRequest; +import com.mile.moim.service.dto.request.MoimCreateRequest; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; diff --git a/module-domain/src/main/java/com/mile/moim/service/MoimService.java b/module-domain/src/main/java/com/mile/moim/service/MoimService.java index a56bd9b8..16c1f390 100644 --- a/module-domain/src/main/java/com/mile/moim/service/MoimService.java +++ b/module-domain/src/main/java/com/mile/moim/service/MoimService.java @@ -4,28 +4,28 @@ import com.mile.exception.model.BadRequestException; import com.mile.exception.model.ForbiddenException; import com.mile.moim.domain.Moim; -import com.mile.moim.service.dto.BestMoimListResponse; -import com.mile.moim.service.dto.ContentListResponse; -import com.mile.moim.service.dto.InvitationCodeGetResponse; -import com.mile.moim.service.dto.MoimAuthenticateResponse; -import com.mile.moim.service.dto.MoimCreateRequest; -import com.mile.moim.service.dto.MoimCreateResponse; -import com.mile.moim.service.dto.MoimCuriousPostListResponse; -import com.mile.moim.service.dto.MoimInfoModifyRequest; -import com.mile.moim.service.dto.MoimInfoOwnerResponse; -import com.mile.moim.service.dto.MoimInfoResponse; -import com.mile.moim.service.dto.MoimInvitationInfoResponse; -import com.mile.moim.service.dto.MoimNameConflictCheckResponse; -import com.mile.moim.service.dto.MoimPublicStatusResponse; -import com.mile.moim.service.dto.MoimTopicInfoListResponse; -import com.mile.moim.service.dto.MoimTopicResponse; -import com.mile.moim.service.dto.MoimWriterNameListGetResponse; -import com.mile.moim.service.dto.PopularWriterListResponse; -import com.mile.moim.service.dto.TemporaryPostExistResponse; -import com.mile.moim.service.dto.TopicCreateRequest; -import com.mile.moim.service.dto.TopicListResponse; -import com.mile.moim.service.dto.WriterMemberJoinRequest; -import com.mile.moim.service.dto.WriterNameConflictCheckResponse; +import com.mile.moim.service.dto.response.BestMoimListResponse; +import com.mile.moim.service.dto.response.ContentListResponse; +import com.mile.moim.service.dto.response.InvitationCodeGetResponse; +import com.mile.moim.service.dto.response.MoimAuthenticateResponse; +import com.mile.moim.service.dto.request.MoimCreateRequest; +import com.mile.moim.service.dto.response.MoimCreateResponse; +import com.mile.moim.service.dto.response.MoimCuriousPostListResponse; +import com.mile.moim.service.dto.request.MoimInfoModifyRequest; +import com.mile.moim.service.dto.response.MoimInfoOwnerResponse; +import com.mile.moim.service.dto.response.MoimInfoResponse; +import com.mile.moim.service.dto.response.MoimInvitationInfoResponse; +import com.mile.moim.service.dto.response.MoimNameConflictCheckResponse; +import com.mile.moim.service.dto.response.MoimPublicStatusResponse; +import com.mile.moim.service.dto.response.MoimTopicInfoListResponse; +import com.mile.moim.service.dto.response.MoimTopicResponse; +import com.mile.moim.service.dto.response.MoimWriterNameListGetResponse; +import com.mile.moim.service.dto.response.PopularWriterListResponse; +import com.mile.moim.service.dto.response.TemporaryPostExistResponse; +import com.mile.moim.service.dto.request.TopicCreateRequest; +import com.mile.moim.service.dto.response.TopicListResponse; +import com.mile.moim.service.dto.request.WriterMemberJoinRequest; +import com.mile.moim.service.dto.response.WriterNameConflictCheckResponse; import com.mile.moim.service.lock.AtomicValidateUniqueMoimName; import com.mile.post.domain.Post; import com.mile.post.service.PostRetriever; @@ -40,7 +40,7 @@ import com.mile.writername.service.WriterNameRemover; import com.mile.writername.service.WriterNameRetriever; import com.mile.writername.service.WriterNameService; -import com.mile.writername.service.dto.WriterNameShortResponse; +import com.mile.writername.service.dto.response.WriterNameShortResponse; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimCreateRequest.java b/module-domain/src/main/java/com/mile/moim/service/dto/request/MoimCreateRequest.java similarity index 97% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimCreateRequest.java rename to module-domain/src/main/java/com/mile/moim/service/dto/request/MoimCreateRequest.java index c0bd0b6c..220f271c 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimCreateRequest.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/request/MoimCreateRequest.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.request; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimInfoModifyRequest.java b/module-domain/src/main/java/com/mile/moim/service/dto/request/MoimInfoModifyRequest.java similarity index 93% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimInfoModifyRequest.java rename to module-domain/src/main/java/com/mile/moim/service/dto/request/MoimInfoModifyRequest.java index 75eafab8..bceb5c37 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimInfoModifyRequest.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/request/MoimInfoModifyRequest.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.request; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/TopicCreateRequest.java b/module-domain/src/main/java/com/mile/moim/service/dto/request/TopicCreateRequest.java similarity index 92% rename from module-domain/src/main/java/com/mile/moim/service/dto/TopicCreateRequest.java rename to module-domain/src/main/java/com/mile/moim/service/dto/request/TopicCreateRequest.java index 983e287f..20df537f 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/TopicCreateRequest.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/request/TopicCreateRequest.java @@ -1,6 +1,5 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.request; -import jakarta.validation.constraints.Max; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/WriterMemberJoinRequest.java b/module-domain/src/main/java/com/mile/moim/service/dto/request/WriterMemberJoinRequest.java similarity index 89% rename from module-domain/src/main/java/com/mile/moim/service/dto/WriterMemberJoinRequest.java rename to module-domain/src/main/java/com/mile/moim/service/dto/request/WriterMemberJoinRequest.java index 483757f3..c7c44d21 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/WriterMemberJoinRequest.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/request/WriterMemberJoinRequest.java @@ -1,6 +1,5 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.request; -import jakarta.validation.constraints.Max; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/BestMoimInfoResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/BestMoimInfoResponse.java similarity index 92% rename from module-domain/src/main/java/com/mile/moim/service/dto/BestMoimInfoResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/BestMoimInfoResponse.java index 6388f81f..83fa9a22 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/BestMoimInfoResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/BestMoimInfoResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import com.mile.moim.domain.Moim; import com.mile.post.domain.Post; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/BestMoimListResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/BestMoimListResponse.java similarity index 90% rename from module-domain/src/main/java/com/mile/moim/service/dto/BestMoimListResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/BestMoimListResponse.java index dabd6a5b..ee8f50cf 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/BestMoimListResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/BestMoimListResponse.java @@ -1,8 +1,8 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import com.mile.moim.domain.Moim; import com.mile.post.domain.Post; -import java.util.ArrayList; + import java.util.List; import java.util.Map; import java.util.stream.Collectors; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/BestMoimPostResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/BestMoimPostResponse.java similarity index 96% rename from module-domain/src/main/java/com/mile/moim/service/dto/BestMoimPostResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/BestMoimPostResponse.java index db3ee905..f0996e22 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/BestMoimPostResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/BestMoimPostResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import com.mile.post.domain.Post; import com.mile.utils.JsoupUtil; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/ContentListResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/ContentListResponse.java similarity index 71% rename from module-domain/src/main/java/com/mile/moim/service/dto/ContentListResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/ContentListResponse.java index 343eb0d4..e162d609 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/ContentListResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/ContentListResponse.java @@ -1,6 +1,6 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; -import com.mile.topic.service.dto.ContentResponse; +import com.mile.topic.service.dto.response.ContentResponse; import java.util.List; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/InvitationCodeGetResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/InvitationCodeGetResponse.java similarity index 85% rename from module-domain/src/main/java/com/mile/moim/service/dto/InvitationCodeGetResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/InvitationCodeGetResponse.java index 062293ca..0199f9a9 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/InvitationCodeGetResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/InvitationCodeGetResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; public record InvitationCodeGetResponse( String invitationCode diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimAuthenticateResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimAuthenticateResponse.java similarity index 86% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimAuthenticateResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimAuthenticateResponse.java index 1b6fd3a3..cb32fdd6 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimAuthenticateResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimAuthenticateResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; public record MoimAuthenticateResponse( boolean isMember, diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimCreateResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimCreateResponse.java similarity index 85% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimCreateResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimCreateResponse.java index 44f4e0c6..5fc3746b 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimCreateResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimCreateResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; public record MoimCreateResponse( String moimId, diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimCuriousPostListResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimCuriousPostListResponse.java similarity index 87% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimCuriousPostListResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimCuriousPostListResponse.java index dc1322d5..a7b6e66b 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimCuriousPostListResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimCuriousPostListResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import java.util.List; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimInfoOwnerResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimInfoOwnerResponse.java similarity index 89% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimInfoOwnerResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimInfoOwnerResponse.java index 9b342daa..7b716b13 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimInfoOwnerResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimInfoOwnerResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import com.mile.moim.domain.Moim; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimInfoResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimInfoResponse.java similarity index 92% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimInfoResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimInfoResponse.java index 06b69426..b2807ae7 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimInfoResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimInfoResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; public record MoimInfoResponse( String imageUrl, diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimInvitationInfoResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimInvitationInfoResponse.java similarity index 93% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimInvitationInfoResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimInvitationInfoResponse.java index 2431ac3f..dbe1de87 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimInvitationInfoResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimInvitationInfoResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import com.mile.moim.domain.Moim; import com.mile.utils.DateUtil; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimListOfUserResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimListOfUserResponse.java similarity index 86% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimListOfUserResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimListOfUserResponse.java index 2c7f5b5b..d23c582e 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimListOfUserResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimListOfUserResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import java.util.List; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimMostCuriousPostResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimMostCuriousPostResponse.java similarity index 95% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimMostCuriousPostResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimMostCuriousPostResponse.java index 55cfd690..def320f7 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimMostCuriousPostResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimMostCuriousPostResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import com.mile.utils.JsoupUtil; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimNameConflictCheckResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimNameConflictCheckResponse.java similarity index 84% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimNameConflictCheckResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimNameConflictCheckResponse.java index bd01fabb..368dfef1 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimNameConflictCheckResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimNameConflictCheckResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; public record MoimNameConflictCheckResponse( boolean isValidate diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimOfUserResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimOfUserResponse.java similarity index 87% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimOfUserResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimOfUserResponse.java index b70dd6bb..7f89c5c7 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimOfUserResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimOfUserResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import com.mile.moim.domain.Moim; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimPublicStatusResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimPublicStatusResponse.java similarity index 83% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimPublicStatusResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimPublicStatusResponse.java index 378e765c..adeb7753 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimPublicStatusResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimPublicStatusResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; public record MoimPublicStatusResponse( boolean isPublic diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimTopicInfoListResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimTopicInfoListResponse.java similarity index 92% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimTopicInfoListResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimTopicInfoListResponse.java index 1003ab33..48cf18f0 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimTopicInfoListResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimTopicInfoListResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import java.util.List; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimTopicInfoResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimTopicInfoResponse.java similarity index 93% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimTopicInfoResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimTopicInfoResponse.java index 23725ff4..36ec12dd 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimTopicInfoResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimTopicInfoResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import com.mile.topic.domain.Topic; import com.mile.utils.DateUtil; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimTopicResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimTopicResponse.java similarity index 81% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimTopicResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimTopicResponse.java index 9bc404de..51b1e0c9 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimTopicResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimTopicResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; public record MoimTopicResponse( String content diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/MoimWriterNameListGetResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimWriterNameListGetResponse.java similarity index 80% rename from module-domain/src/main/java/com/mile/moim/service/dto/MoimWriterNameListGetResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/MoimWriterNameListGetResponse.java index 33eab5f1..a80fd96d 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/MoimWriterNameListGetResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/MoimWriterNameListGetResponse.java @@ -1,6 +1,6 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; -import com.mile.writername.service.dto.WriterNameInfoResponse; +import com.mile.writername.service.dto.response.WriterNameInfoResponse; import java.util.List; public record MoimWriterNameListGetResponse( diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/PopularWriterListResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/PopularWriterListResponse.java similarity index 80% rename from module-domain/src/main/java/com/mile/moim/service/dto/PopularWriterListResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/PopularWriterListResponse.java index f9d623a0..09ba3480 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/PopularWriterListResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/PopularWriterListResponse.java @@ -1,7 +1,7 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; import com.mile.writername.domain.WriterName; -import com.mile.writername.service.dto.PopularWriterResponse; +import com.mile.writername.service.dto.response.PopularWriterResponse; import java.util.List; import java.util.stream.Collectors; diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/TemporaryPostExistResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/TemporaryPostExistResponse.java similarity index 88% rename from module-domain/src/main/java/com/mile/moim/service/dto/TemporaryPostExistResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/TemporaryPostExistResponse.java index f4de8b69..290b5049 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/TemporaryPostExistResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/TemporaryPostExistResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; public record TemporaryPostExistResponse( boolean isTemporaryPostExist, diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/TopicListResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/TopicListResponse.java similarity index 69% rename from module-domain/src/main/java/com/mile/moim/service/dto/TopicListResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/TopicListResponse.java index 66c7d2cd..7a57cd57 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/TopicListResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/TopicListResponse.java @@ -1,6 +1,6 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; -import com.mile.topic.service.dto.TopicResponse; +import com.mile.topic.service.dto.response.TopicResponse; import java.util.List; public record TopicListResponse(List topicList) { diff --git a/module-domain/src/main/java/com/mile/moim/service/dto/WriterNameConflictCheckResponse.java b/module-domain/src/main/java/com/mile/moim/service/dto/response/WriterNameConflictCheckResponse.java similarity index 83% rename from module-domain/src/main/java/com/mile/moim/service/dto/WriterNameConflictCheckResponse.java rename to module-domain/src/main/java/com/mile/moim/service/dto/response/WriterNameConflictCheckResponse.java index dc5912bc..dc917aa8 100644 --- a/module-domain/src/main/java/com/mile/moim/service/dto/WriterNameConflictCheckResponse.java +++ b/module-domain/src/main/java/com/mile/moim/service/dto/response/WriterNameConflictCheckResponse.java @@ -1,4 +1,4 @@ -package com.mile.moim.service.dto; +package com.mile.moim.service.dto.response; public record WriterNameConflictCheckResponse( boolean isConflict diff --git a/module-domain/src/main/java/com/mile/post/domain/Post.java b/module-domain/src/main/java/com/mile/post/domain/Post.java index acc17159..ff850fe7 100644 --- a/module-domain/src/main/java/com/mile/post/domain/Post.java +++ b/module-domain/src/main/java/com/mile/post/domain/Post.java @@ -1,7 +1,7 @@ package com.mile.post.domain; import com.mile.config.BaseTimeEntity; -import com.mile.post.service.dto.PostPutRequest; +import com.mile.post.service.dto.request.PostPutRequest; import com.mile.topic.domain.Topic; import com.mile.writername.domain.WriterName; import jakarta.persistence.Column; diff --git a/module-domain/src/main/java/com/mile/post/service/PostCreator.java b/module-domain/src/main/java/com/mile/post/service/PostCreator.java index 2793434e..0405b33d 100644 --- a/module-domain/src/main/java/com/mile/post/service/PostCreator.java +++ b/module-domain/src/main/java/com/mile/post/service/PostCreator.java @@ -2,8 +2,8 @@ import com.mile.post.domain.Post; import com.mile.post.repository.PostRepository; -import com.mile.post.service.dto.PostCreateRequest; -import com.mile.post.service.dto.TemporaryPostCreateRequest; +import com.mile.post.service.dto.request.PostCreateRequest; +import com.mile.post.service.dto.request.TemporaryPostCreateRequest; import com.mile.topic.domain.Topic; import com.mile.utils.SecureUrlUtil; import com.mile.writername.domain.WriterName; diff --git a/module-domain/src/main/java/com/mile/post/service/PostRetriever.java b/module-domain/src/main/java/com/mile/post/service/PostRetriever.java index f11f4c9a..22c47e8d 100644 --- a/module-domain/src/main/java/com/mile/post/service/PostRetriever.java +++ b/module-domain/src/main/java/com/mile/post/service/PostRetriever.java @@ -4,8 +4,8 @@ import com.mile.exception.model.ForbiddenException; import com.mile.exception.model.NotFoundException; import com.mile.moim.domain.Moim; -import com.mile.moim.service.dto.MoimCuriousPostListResponse; -import com.mile.moim.service.dto.MoimMostCuriousPostResponse; +import com.mile.moim.service.dto.response.MoimCuriousPostListResponse; +import com.mile.moim.service.dto.response.MoimMostCuriousPostResponse; import com.mile.post.domain.Post; import com.mile.post.repository.PostRepository; import com.mile.topic.domain.Topic; diff --git a/module-domain/src/main/java/com/mile/post/service/PostService.java b/module-domain/src/main/java/com/mile/post/service/PostService.java index e2355136..c48952fc 100644 --- a/module-domain/src/main/java/com/mile/post/service/PostService.java +++ b/module-domain/src/main/java/com/mile/post/service/PostService.java @@ -12,24 +12,24 @@ import com.mile.moim.domain.Moim; import com.mile.moim.service.MoimRetriever; import com.mile.post.domain.Post; -import com.mile.post.service.dto.CommentCreateRequest; -import com.mile.post.service.dto.CommentListResponse; -import com.mile.post.service.dto.ModifyPostGetResponse; -import com.mile.post.service.dto.PostCreateRequest; -import com.mile.post.service.dto.PostCuriousResponse; -import com.mile.post.service.dto.PostGetResponse; -import com.mile.post.service.dto.PostPutRequest; -import com.mile.post.service.dto.TemporaryPostCreateRequest; -import com.mile.post.service.dto.TemporaryPostGetResponse; -import com.mile.post.service.dto.PostAuthenticateResponse; +import com.mile.post.service.dto.request.CommentCreateRequest; +import com.mile.post.service.dto.response.CommentListResponse; +import com.mile.post.service.dto.response.ModifyPostGetResponse; +import com.mile.post.service.dto.request.PostCreateRequest; +import com.mile.post.service.dto.response.PostCuriousResponse; +import com.mile.post.service.dto.response.PostGetResponse; +import com.mile.post.service.dto.request.PostPutRequest; +import com.mile.post.service.dto.request.TemporaryPostCreateRequest; +import com.mile.post.service.dto.response.TemporaryPostGetResponse; +import com.mile.post.service.dto.response.PostAuthenticateResponse; import com.mile.topic.domain.Topic; import com.mile.topic.service.TopicRetriever; import com.mile.topic.service.TopicService; -import com.mile.topic.service.dto.ContentWithIsSelectedResponse; +import com.mile.topic.service.dto.response.ContentWithIsSelectedResponse; import com.mile.utils.SecureUrlUtil; import com.mile.writername.domain.WriterName; import com.mile.writername.service.WriterNameRetriever; -import com.mile.writername.service.dto.WriterNameResponse; +import com.mile.writername.service.dto.response.WriterNameResponse; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/module-domain/src/main/java/com/mile/post/service/PostUpdator.java b/module-domain/src/main/java/com/mile/post/service/PostUpdator.java index 17f1200e..5d92627e 100644 --- a/module-domain/src/main/java/com/mile/post/service/PostUpdator.java +++ b/module-domain/src/main/java/com/mile/post/service/PostUpdator.java @@ -2,11 +2,10 @@ import com.mile.post.domain.Post; import com.mile.post.repository.PostRepository; -import com.mile.post.service.dto.PostPutRequest; +import com.mile.post.service.dto.request.PostPutRequest; import com.mile.topic.domain.Topic; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import java.time.LocalDateTime; diff --git a/module-domain/src/main/java/com/mile/post/service/dto/CommentCreateRequest.java b/module-domain/src/main/java/com/mile/post/service/dto/request/CommentCreateRequest.java similarity index 93% rename from module-domain/src/main/java/com/mile/post/service/dto/CommentCreateRequest.java rename to module-domain/src/main/java/com/mile/post/service/dto/request/CommentCreateRequest.java index 3dbe404d..908fd046 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/CommentCreateRequest.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/request/CommentCreateRequest.java @@ -1,4 +1,4 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.request; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/module-domain/src/main/java/com/mile/post/service/dto/PostCreateRequest.java b/module-domain/src/main/java/com/mile/post/service/dto/request/PostCreateRequest.java similarity index 93% rename from module-domain/src/main/java/com/mile/post/service/dto/PostCreateRequest.java rename to module-domain/src/main/java/com/mile/post/service/dto/request/PostCreateRequest.java index 9f1cbc74..bb77f094 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/PostCreateRequest.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/request/PostCreateRequest.java @@ -1,8 +1,7 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.request; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; diff --git a/module-domain/src/main/java/com/mile/post/service/dto/PostPutRequest.java b/module-domain/src/main/java/com/mile/post/service/dto/request/PostPutRequest.java similarity index 93% rename from module-domain/src/main/java/com/mile/post/service/dto/PostPutRequest.java rename to module-domain/src/main/java/com/mile/post/service/dto/request/PostPutRequest.java index 6efe66b8..be15b495 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/PostPutRequest.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/request/PostPutRequest.java @@ -1,8 +1,7 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.request; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; diff --git a/module-domain/src/main/java/com/mile/post/service/dto/TemporaryPostCreateRequest.java b/module-domain/src/main/java/com/mile/post/service/dto/request/TemporaryPostCreateRequest.java similarity index 92% rename from module-domain/src/main/java/com/mile/post/service/dto/TemporaryPostCreateRequest.java rename to module-domain/src/main/java/com/mile/post/service/dto/request/TemporaryPostCreateRequest.java index 3c1aaf4a..5e4ab778 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/TemporaryPostCreateRequest.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/request/TemporaryPostCreateRequest.java @@ -1,7 +1,6 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.request; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; diff --git a/module-domain/src/main/java/com/mile/post/service/dto/CommentListResponse.java b/module-domain/src/main/java/com/mile/post/service/dto/response/CommentListResponse.java similarity index 88% rename from module-domain/src/main/java/com/mile/post/service/dto/CommentListResponse.java rename to module-domain/src/main/java/com/mile/post/service/dto/response/CommentListResponse.java index d294e92c..d668c496 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/CommentListResponse.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/response/CommentListResponse.java @@ -1,4 +1,4 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.response; import com.mile.comment.service.dto.CommentResponse; import java.util.List; diff --git a/module-domain/src/main/java/com/mile/post/service/dto/ModifyPostGetResponse.java b/module-domain/src/main/java/com/mile/post/service/dto/response/ModifyPostGetResponse.java similarity index 83% rename from module-domain/src/main/java/com/mile/post/service/dto/ModifyPostGetResponse.java rename to module-domain/src/main/java/com/mile/post/service/dto/response/ModifyPostGetResponse.java index 480be323..bf72e448 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/ModifyPostGetResponse.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/response/ModifyPostGetResponse.java @@ -1,7 +1,7 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.response; import com.mile.post.domain.Post; -import com.mile.topic.service.dto.ContentWithIsSelectedResponse; +import com.mile.topic.service.dto.response.ContentWithIsSelectedResponse; import java.util.List; public record ModifyPostGetResponse( diff --git a/module-domain/src/main/java/com/mile/post/service/dto/PostAuthenticateResponse.java b/module-domain/src/main/java/com/mile/post/service/dto/response/PostAuthenticateResponse.java similarity index 82% rename from module-domain/src/main/java/com/mile/post/service/dto/PostAuthenticateResponse.java rename to module-domain/src/main/java/com/mile/post/service/dto/response/PostAuthenticateResponse.java index 5013e6ea..810fb377 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/PostAuthenticateResponse.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/response/PostAuthenticateResponse.java @@ -1,4 +1,4 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.response; public record PostAuthenticateResponse( String role diff --git a/module-domain/src/main/java/com/mile/post/service/dto/PostCuriousResponse.java b/module-domain/src/main/java/com/mile/post/service/dto/response/PostCuriousResponse.java similarity index 80% rename from module-domain/src/main/java/com/mile/post/service/dto/PostCuriousResponse.java rename to module-domain/src/main/java/com/mile/post/service/dto/response/PostCuriousResponse.java index 7ef39c4d..a94e90c6 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/PostCuriousResponse.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/response/PostCuriousResponse.java @@ -1,4 +1,4 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.response; public record PostCuriousResponse(boolean isCurious) { public static PostCuriousResponse of(boolean isCurious) { diff --git a/module-domain/src/main/java/com/mile/post/service/dto/PostGetResponse.java b/module-domain/src/main/java/com/mile/post/service/dto/response/PostGetResponse.java similarity index 96% rename from module-domain/src/main/java/com/mile/post/service/dto/PostGetResponse.java rename to module-domain/src/main/java/com/mile/post/service/dto/response/PostGetResponse.java index 20ef2f02..676997e1 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/PostGetResponse.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/response/PostGetResponse.java @@ -1,4 +1,4 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.response; import com.mile.moim.domain.Moim; import com.mile.post.domain.Post; diff --git a/module-domain/src/main/java/com/mile/post/service/dto/PostListResponse.java b/module-domain/src/main/java/com/mile/post/service/dto/response/PostListResponse.java similarity index 97% rename from module-domain/src/main/java/com/mile/post/service/dto/PostListResponse.java rename to module-domain/src/main/java/com/mile/post/service/dto/response/PostListResponse.java index 0b99fc82..c2d7f93d 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/PostListResponse.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/response/PostListResponse.java @@ -1,4 +1,4 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.response; import com.mile.post.domain.Post; import com.mile.utils.DateUtil; diff --git a/module-domain/src/main/java/com/mile/post/service/dto/TemporaryPostGetResponse.java b/module-domain/src/main/java/com/mile/post/service/dto/response/TemporaryPostGetResponse.java similarity index 83% rename from module-domain/src/main/java/com/mile/post/service/dto/TemporaryPostGetResponse.java rename to module-domain/src/main/java/com/mile/post/service/dto/response/TemporaryPostGetResponse.java index d6b09867..60de3c92 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/TemporaryPostGetResponse.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/response/TemporaryPostGetResponse.java @@ -1,7 +1,7 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.response; import com.mile.post.domain.Post; -import com.mile.topic.service.dto.ContentWithIsSelectedResponse; +import com.mile.topic.service.dto.response.ContentWithIsSelectedResponse; import java.util.List; diff --git a/module-domain/src/main/java/com/mile/post/service/dto/TemporaryPostTopicGetResponse.java b/module-domain/src/main/java/com/mile/post/service/dto/response/TemporaryPostTopicGetResponse.java similarity index 86% rename from module-domain/src/main/java/com/mile/post/service/dto/TemporaryPostTopicGetResponse.java rename to module-domain/src/main/java/com/mile/post/service/dto/response/TemporaryPostTopicGetResponse.java index 2f3b7b8c..58930f62 100644 --- a/module-domain/src/main/java/com/mile/post/service/dto/TemporaryPostTopicGetResponse.java +++ b/module-domain/src/main/java/com/mile/post/service/dto/response/TemporaryPostTopicGetResponse.java @@ -1,4 +1,4 @@ -package com.mile.post.service.dto; +package com.mile.post.service.dto.response; import com.mile.topic.domain.Topic; diff --git a/module-domain/src/main/java/com/mile/topic/domain/Topic.java b/module-domain/src/main/java/com/mile/topic/domain/Topic.java index 0cc63e53..5bde4c15 100644 --- a/module-domain/src/main/java/com/mile/topic/domain/Topic.java +++ b/module-domain/src/main/java/com/mile/topic/domain/Topic.java @@ -2,8 +2,8 @@ import com.mile.config.BaseTimeEntity; import com.mile.moim.domain.Moim; -import com.mile.moim.service.dto.TopicCreateRequest; -import com.mile.topic.service.dto.TopicPutRequest; +import com.mile.moim.service.dto.request.TopicCreateRequest; +import com.mile.topic.service.dto.request.TopicPutRequest; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.GeneratedValue; diff --git a/module-domain/src/main/java/com/mile/topic/service/TopicCreator.java b/module-domain/src/main/java/com/mile/topic/service/TopicCreator.java index f3de1a8f..c6a19220 100644 --- a/module-domain/src/main/java/com/mile/topic/service/TopicCreator.java +++ b/module-domain/src/main/java/com/mile/topic/service/TopicCreator.java @@ -1,7 +1,7 @@ package com.mile.topic.service; import com.mile.moim.domain.Moim; -import com.mile.moim.service.dto.TopicCreateRequest; +import com.mile.moim.service.dto.request.TopicCreateRequest; import com.mile.topic.domain.Topic; import com.mile.topic.repository.TopicRepository; import com.mile.utils.SecureUrlUtil; diff --git a/module-domain/src/main/java/com/mile/topic/service/TopicRetriever.java b/module-domain/src/main/java/com/mile/topic/service/TopicRetriever.java index f6403dfc..c4734747 100644 --- a/module-domain/src/main/java/com/mile/topic/service/TopicRetriever.java +++ b/module-domain/src/main/java/com/mile/topic/service/TopicRetriever.java @@ -1,7 +1,6 @@ package com.mile.topic.service; import com.mile.comment.service.CommentRetriever; -import com.mile.comment.service.CommentService; import com.mile.commentreply.service.CommentReplyRetriever; import com.mile.config.BaseTimeEntity; import com.mile.exception.message.ErrorMessage; @@ -9,19 +8,19 @@ import com.mile.exception.model.ForbiddenException; import com.mile.exception.model.NotFoundException; import com.mile.moim.domain.Moim; -import com.mile.moim.service.dto.MoimTopicInfoListResponse; -import com.mile.moim.service.dto.MoimTopicInfoResponse; +import com.mile.moim.service.dto.response.MoimTopicInfoListResponse; +import com.mile.moim.service.dto.response.MoimTopicInfoResponse; import com.mile.post.domain.Post; import com.mile.post.service.PostRetriever; -import com.mile.post.service.dto.PostListResponse; +import com.mile.post.service.dto.response.PostListResponse; import com.mile.topic.domain.Topic; import com.mile.topic.repository.TopicRepository; -import com.mile.topic.service.dto.ContentResponse; -import com.mile.topic.service.dto.ContentWithIsSelectedResponse; -import com.mile.topic.service.dto.PostListInTopicResponse; -import com.mile.topic.service.dto.TopicDetailResponse; -import com.mile.topic.service.dto.TopicOfMoimResponse; -import com.mile.topic.service.dto.TopicResponse; +import com.mile.topic.service.dto.response.ContentResponse; +import com.mile.topic.service.dto.response.ContentWithIsSelectedResponse; +import com.mile.topic.service.dto.response.PostListInTopicResponse; +import com.mile.topic.service.dto.response.TopicDetailResponse; +import com.mile.topic.service.dto.response.TopicOfMoimResponse; +import com.mile.topic.service.dto.response.TopicResponse; import com.mile.user.domain.User; import com.mile.user.service.UserRetriever; import com.mile.utils.SecureUrlUtil; diff --git a/module-domain/src/main/java/com/mile/topic/service/TopicService.java b/module-domain/src/main/java/com/mile/topic/service/TopicService.java index 98084a60..c34bee67 100644 --- a/module-domain/src/main/java/com/mile/topic/service/TopicService.java +++ b/module-domain/src/main/java/com/mile/topic/service/TopicService.java @@ -1,17 +1,13 @@ package com.mile.topic.service; -import com.mile.moim.domain.Moim; -import com.mile.moim.service.dto.MoimTopicInfoListResponse; -import com.mile.moim.service.dto.TopicCreateRequest; import com.mile.topic.domain.Topic; -import com.mile.topic.service.dto.ContentWithIsSelectedResponse; -import com.mile.topic.service.dto.PostListInTopicResponse; -import com.mile.topic.service.dto.TopicDetailResponse; -import com.mile.topic.service.dto.TopicPutRequest; +import com.mile.topic.service.dto.response.ContentWithIsSelectedResponse; +import com.mile.topic.service.dto.response.PostListInTopicResponse; +import com.mile.topic.service.dto.response.TopicDetailResponse; +import com.mile.topic.service.dto.request.TopicPutRequest; import com.mile.user.domain.User; import com.mile.user.service.UserService; import lombok.RequiredArgsConstructor; -import org.springframework.data.domain.Page; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/module-domain/src/main/java/com/mile/topic/service/TopicUpdator.java b/module-domain/src/main/java/com/mile/topic/service/TopicUpdator.java index 93924d60..811ca528 100644 --- a/module-domain/src/main/java/com/mile/topic/service/TopicUpdator.java +++ b/module-domain/src/main/java/com/mile/topic/service/TopicUpdator.java @@ -1,7 +1,7 @@ package com.mile.topic.service; import com.mile.topic.domain.Topic; -import com.mile.topic.service.dto.TopicPutRequest; +import com.mile.topic.service.dto.request.TopicPutRequest; import com.mile.user.domain.User; import com.mile.user.service.UserService; import jakarta.transaction.Transactional; diff --git a/module-domain/src/main/java/com/mile/topic/service/dto/TopicPutRequest.java b/module-domain/src/main/java/com/mile/topic/service/dto/request/TopicPutRequest.java similarity index 93% rename from module-domain/src/main/java/com/mile/topic/service/dto/TopicPutRequest.java rename to module-domain/src/main/java/com/mile/topic/service/dto/request/TopicPutRequest.java index 47a68566..82d9a817 100644 --- a/module-domain/src/main/java/com/mile/topic/service/dto/TopicPutRequest.java +++ b/module-domain/src/main/java/com/mile/topic/service/dto/request/TopicPutRequest.java @@ -1,4 +1,4 @@ -package com.mile.topic.service.dto; +package com.mile.topic.service.dto.request; import jakarta.validation.constraints.NotBlank; diff --git a/module-domain/src/main/java/com/mile/topic/service/dto/ContentResponse.java b/module-domain/src/main/java/com/mile/topic/service/dto/response/ContentResponse.java similarity index 86% rename from module-domain/src/main/java/com/mile/topic/service/dto/ContentResponse.java rename to module-domain/src/main/java/com/mile/topic/service/dto/response/ContentResponse.java index 71ecf133..878c3abc 100644 --- a/module-domain/src/main/java/com/mile/topic/service/dto/ContentResponse.java +++ b/module-domain/src/main/java/com/mile/topic/service/dto/response/ContentResponse.java @@ -1,4 +1,4 @@ -package com.mile.topic.service.dto; +package com.mile.topic.service.dto.response; import com.mile.topic.domain.Topic; diff --git a/module-domain/src/main/java/com/mile/topic/service/dto/ContentWithIsSelectedResponse.java b/module-domain/src/main/java/com/mile/topic/service/dto/response/ContentWithIsSelectedResponse.java similarity index 89% rename from module-domain/src/main/java/com/mile/topic/service/dto/ContentWithIsSelectedResponse.java rename to module-domain/src/main/java/com/mile/topic/service/dto/response/ContentWithIsSelectedResponse.java index db9b5f0a..aa379ad5 100644 --- a/module-domain/src/main/java/com/mile/topic/service/dto/ContentWithIsSelectedResponse.java +++ b/module-domain/src/main/java/com/mile/topic/service/dto/response/ContentWithIsSelectedResponse.java @@ -1,4 +1,4 @@ -package com.mile.topic.service.dto; +package com.mile.topic.service.dto.response; import com.mile.topic.domain.Topic; diff --git a/module-domain/src/main/java/com/mile/topic/service/dto/PostListInTopicResponse.java b/module-domain/src/main/java/com/mile/topic/service/dto/response/PostListInTopicResponse.java similarity index 80% rename from module-domain/src/main/java/com/mile/topic/service/dto/PostListInTopicResponse.java rename to module-domain/src/main/java/com/mile/topic/service/dto/response/PostListInTopicResponse.java index c152d790..40ddcb36 100644 --- a/module-domain/src/main/java/com/mile/topic/service/dto/PostListInTopicResponse.java +++ b/module-domain/src/main/java/com/mile/topic/service/dto/response/PostListInTopicResponse.java @@ -1,6 +1,6 @@ -package com.mile.topic.service.dto; +package com.mile.topic.service.dto.response; -import com.mile.post.service.dto.PostListResponse; +import com.mile.post.service.dto.response.PostListResponse; import java.util.List; diff --git a/module-domain/src/main/java/com/mile/topic/service/dto/TopicDetailResponse.java b/module-domain/src/main/java/com/mile/topic/service/dto/response/TopicDetailResponse.java similarity index 90% rename from module-domain/src/main/java/com/mile/topic/service/dto/TopicDetailResponse.java rename to module-domain/src/main/java/com/mile/topic/service/dto/response/TopicDetailResponse.java index caccd48b..30958ab4 100644 --- a/module-domain/src/main/java/com/mile/topic/service/dto/TopicDetailResponse.java +++ b/module-domain/src/main/java/com/mile/topic/service/dto/response/TopicDetailResponse.java @@ -1,4 +1,4 @@ -package com.mile.topic.service.dto; +package com.mile.topic.service.dto.response; import com.mile.topic.domain.Topic; import com.mile.utils.DateUtil; diff --git a/module-domain/src/main/java/com/mile/topic/service/dto/TopicOfMoimResponse.java b/module-domain/src/main/java/com/mile/topic/service/dto/response/TopicOfMoimResponse.java similarity index 86% rename from module-domain/src/main/java/com/mile/topic/service/dto/TopicOfMoimResponse.java rename to module-domain/src/main/java/com/mile/topic/service/dto/response/TopicOfMoimResponse.java index 016d7241..f80efaf0 100644 --- a/module-domain/src/main/java/com/mile/topic/service/dto/TopicOfMoimResponse.java +++ b/module-domain/src/main/java/com/mile/topic/service/dto/response/TopicOfMoimResponse.java @@ -1,4 +1,4 @@ -package com.mile.topic.service.dto; +package com.mile.topic.service.dto.response; import com.mile.topic.domain.Topic; diff --git a/module-domain/src/main/java/com/mile/topic/service/dto/TopicResponse.java b/module-domain/src/main/java/com/mile/topic/service/dto/response/TopicResponse.java similarity index 84% rename from module-domain/src/main/java/com/mile/topic/service/dto/TopicResponse.java rename to module-domain/src/main/java/com/mile/topic/service/dto/response/TopicResponse.java index 7566e6a0..26297f6d 100644 --- a/module-domain/src/main/java/com/mile/topic/service/dto/TopicResponse.java +++ b/module-domain/src/main/java/com/mile/topic/service/dto/response/TopicResponse.java @@ -1,4 +1,4 @@ -package com.mile.topic.service.dto; +package com.mile.topic.service.dto.response; import com.mile.topic.domain.Topic; diff --git a/module-domain/src/main/java/com/mile/user/service/UserService.java b/module-domain/src/main/java/com/mile/user/service/UserService.java index a4925f45..eae62fe2 100644 --- a/module-domain/src/main/java/com/mile/user/service/UserService.java +++ b/module-domain/src/main/java/com/mile/user/service/UserService.java @@ -1,8 +1,8 @@ package com.mile.user.service; import com.mile.client.SocialType; -import com.mile.moim.service.dto.MoimListOfUserResponse; -import com.mile.moim.service.dto.MoimOfUserResponse; +import com.mile.moim.service.dto.response.MoimListOfUserResponse; +import com.mile.moim.service.dto.response.MoimOfUserResponse; import com.mile.user.domain.User; import com.mile.writername.service.WriterNameRetriever; import com.mile.writername.service.WriterNameService; diff --git a/module-domain/src/main/java/com/mile/writername/domain/WriterName.java b/module-domain/src/main/java/com/mile/writername/domain/WriterName.java index e85c1f82..b30d6259 100644 --- a/module-domain/src/main/java/com/mile/writername/domain/WriterName.java +++ b/module-domain/src/main/java/com/mile/writername/domain/WriterName.java @@ -1,9 +1,9 @@ package com.mile.writername.domain; import com.mile.moim.domain.Moim; -import com.mile.moim.service.dto.WriterMemberJoinRequest; +import com.mile.moim.service.dto.request.WriterMemberJoinRequest; import com.mile.user.domain.User; -import com.mile.writername.service.dto.WriterNameDescriptionUpdateRequest; +import com.mile.writername.service.dto.request.WriterNameDescriptionUpdateRequest; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.GeneratedValue; diff --git a/module-domain/src/main/java/com/mile/writername/service/WriterNameCreator.java b/module-domain/src/main/java/com/mile/writername/service/WriterNameCreator.java index 33267a5f..33a392df 100644 --- a/module-domain/src/main/java/com/mile/writername/service/WriterNameCreator.java +++ b/module-domain/src/main/java/com/mile/writername/service/WriterNameCreator.java @@ -3,7 +3,7 @@ import com.mile.exception.message.ErrorMessage; import com.mile.exception.model.ConflictException; import com.mile.moim.domain.Moim; -import com.mile.moim.service.dto.WriterMemberJoinRequest; +import com.mile.moim.service.dto.request.WriterMemberJoinRequest; import com.mile.user.domain.User; import com.mile.writername.domain.WriterName; import com.mile.writername.repository.WriterNameRepository; diff --git a/module-domain/src/main/java/com/mile/writername/service/WriterNameRetriever.java b/module-domain/src/main/java/com/mile/writername/service/WriterNameRetriever.java index 78ed7b6c..b28077ed 100644 --- a/module-domain/src/main/java/com/mile/writername/service/WriterNameRetriever.java +++ b/module-domain/src/main/java/com/mile/writername/service/WriterNameRetriever.java @@ -4,11 +4,10 @@ import com.mile.exception.model.ForbiddenException; import com.mile.exception.model.NotFoundException; import com.mile.moim.domain.Moim; -import com.mile.post.domain.Post; import com.mile.user.domain.User; import com.mile.writername.domain.WriterName; import com.mile.writername.repository.WriterNameRepository; -import com.mile.writername.service.dto.WriterNameShortResponse; +import com.mile.writername.service.dto.response.WriterNameShortResponse; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; diff --git a/module-domain/src/main/java/com/mile/writername/service/WriterNameService.java b/module-domain/src/main/java/com/mile/writername/service/WriterNameService.java index 7dc69ee2..fe4cac62 100644 --- a/module-domain/src/main/java/com/mile/writername/service/WriterNameService.java +++ b/module-domain/src/main/java/com/mile/writername/service/WriterNameService.java @@ -9,15 +9,15 @@ import com.mile.moim.domain.Moim; import com.mile.moim.service.MoimRemover; import com.mile.moim.service.MoimRetriever; -import com.mile.moim.service.dto.MoimWriterNameListGetResponse; -import com.mile.moim.service.dto.WriterMemberJoinRequest; +import com.mile.moim.service.dto.response.MoimWriterNameListGetResponse; +import com.mile.moim.service.dto.request.WriterMemberJoinRequest; import com.mile.post.service.PostRetriever; import com.mile.user.domain.User; import com.mile.user.service.UserRetriever; import com.mile.writername.domain.WriterName; -import com.mile.writername.service.dto.WriterNameDescriptionResponse; -import com.mile.writername.service.dto.WriterNameDescriptionUpdateRequest; -import com.mile.writername.service.dto.WriterNameInfoResponse; +import com.mile.writername.service.dto.response.WriterNameDescriptionResponse; +import com.mile.writername.service.dto.request.WriterNameDescriptionUpdateRequest; +import com.mile.writername.service.dto.response.WriterNameInfoResponse; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; @@ -26,7 +26,6 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; -import java.util.stream.Collectors; @Service diff --git a/module-domain/src/main/java/com/mile/writername/service/dto/WriterNameDescriptionUpdateRequest.java b/module-domain/src/main/java/com/mile/writername/service/dto/request/WriterNameDescriptionUpdateRequest.java similarity index 82% rename from module-domain/src/main/java/com/mile/writername/service/dto/WriterNameDescriptionUpdateRequest.java rename to module-domain/src/main/java/com/mile/writername/service/dto/request/WriterNameDescriptionUpdateRequest.java index 5a16f282..48f71fd7 100644 --- a/module-domain/src/main/java/com/mile/writername/service/dto/WriterNameDescriptionUpdateRequest.java +++ b/module-domain/src/main/java/com/mile/writername/service/dto/request/WriterNameDescriptionUpdateRequest.java @@ -1,4 +1,4 @@ -package com.mile.writername.service.dto; +package com.mile.writername.service.dto.request; import jakarta.validation.constraints.Size; diff --git a/module-domain/src/main/java/com/mile/writername/service/dto/PopularWriterResponse.java b/module-domain/src/main/java/com/mile/writername/service/dto/response/PopularWriterResponse.java similarity index 84% rename from module-domain/src/main/java/com/mile/writername/service/dto/PopularWriterResponse.java rename to module-domain/src/main/java/com/mile/writername/service/dto/response/PopularWriterResponse.java index 59f57e2e..efdf8aec 100644 --- a/module-domain/src/main/java/com/mile/writername/service/dto/PopularWriterResponse.java +++ b/module-domain/src/main/java/com/mile/writername/service/dto/response/PopularWriterResponse.java @@ -1,4 +1,4 @@ -package com.mile.writername.service.dto; +package com.mile.writername.service.dto.response; import com.mile.writername.domain.WriterName; diff --git a/module-domain/src/main/java/com/mile/writername/service/dto/WriterNameDescriptionResponse.java b/module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameDescriptionResponse.java similarity index 87% rename from module-domain/src/main/java/com/mile/writername/service/dto/WriterNameDescriptionResponse.java rename to module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameDescriptionResponse.java index bedb04f7..2739fbe0 100644 --- a/module-domain/src/main/java/com/mile/writername/service/dto/WriterNameDescriptionResponse.java +++ b/module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameDescriptionResponse.java @@ -1,4 +1,4 @@ -package com.mile.writername.service.dto; +package com.mile.writername.service.dto.response; import com.mile.writername.domain.WriterName; diff --git a/module-domain/src/main/java/com/mile/writername/service/dto/WriterNameInfoResponse.java b/module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameInfoResponse.java similarity index 91% rename from module-domain/src/main/java/com/mile/writername/service/dto/WriterNameInfoResponse.java rename to module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameInfoResponse.java index f4373279..79b427c7 100644 --- a/module-domain/src/main/java/com/mile/writername/service/dto/WriterNameInfoResponse.java +++ b/module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameInfoResponse.java @@ -1,4 +1,4 @@ -package com.mile.writername.service.dto; +package com.mile.writername.service.dto.response; public record WriterNameInfoResponse( Long writerNameId, diff --git a/module-domain/src/main/java/com/mile/writername/service/dto/WriterNameResponse.java b/module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameResponse.java similarity index 84% rename from module-domain/src/main/java/com/mile/writername/service/dto/WriterNameResponse.java rename to module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameResponse.java index 3afd0cdf..a3cece34 100644 --- a/module-domain/src/main/java/com/mile/writername/service/dto/WriterNameResponse.java +++ b/module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameResponse.java @@ -1,4 +1,4 @@ -package com.mile.writername.service.dto; +package com.mile.writername.service.dto.response; public record WriterNameResponse( String postId, diff --git a/module-domain/src/main/java/com/mile/writername/service/dto/WriterNameShortResponse.java b/module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameShortResponse.java similarity index 86% rename from module-domain/src/main/java/com/mile/writername/service/dto/WriterNameShortResponse.java rename to module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameShortResponse.java index 0273d773..f79cad12 100644 --- a/module-domain/src/main/java/com/mile/writername/service/dto/WriterNameShortResponse.java +++ b/module-domain/src/main/java/com/mile/writername/service/dto/response/WriterNameShortResponse.java @@ -1,4 +1,4 @@ -package com.mile.writername.service.dto; +package com.mile.writername.service.dto.response; import com.mile.writername.domain.WriterName; From 5f78bed50e4e304c2bda501fa8601f2ddaca3c30 Mon Sep 17 00:00:00 2001 From: sohyundoh Date: Wed, 21 Aug 2024 13:31:36 +0900 Subject: [PATCH 2/2] =?UTF-8?q?#499=20[feat]=20sentry=20exception=20monito?= =?UTF-8?q?ring=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module-common/build.gradle | 2 ++ .../com/mile/handler/GlobalExceptionHandler.java | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/module-common/build.gradle b/module-common/build.gradle index 1b210e86..65671eae 100644 --- a/module-common/build.gradle +++ b/module-common/build.gradle @@ -4,4 +4,6 @@ jar { enabled = true } dependencies { //Aop implementation 'org.springframework.boot:spring-boot-starter-aop' + //Sentry + implementation 'io.sentry:sentry-spring-boot-starter-jakarta:7.9.0' } \ No newline at end of file diff --git a/module-common/src/main/java/com/mile/handler/GlobalExceptionHandler.java b/module-common/src/main/java/com/mile/handler/GlobalExceptionHandler.java index 9668119c..9cc0513c 100644 --- a/module-common/src/main/java/com/mile/handler/GlobalExceptionHandler.java +++ b/module-common/src/main/java/com/mile/handler/GlobalExceptionHandler.java @@ -9,6 +9,7 @@ import com.mile.exception.model.NotFoundException; import com.mile.exception.model.TooManyRequestException; import com.mile.exception.model.UnauthorizedException; +import io.sentry.Sentry; import jakarta.servlet.http.HttpServletRequest; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; @@ -33,41 +34,49 @@ public class GlobalExceptionHandler { @ExceptionHandler(HttpMessageNotReadableException.class) public ResponseEntity handleHttpMessageNotReadableException(final HttpMessageNotReadableException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(ErrorResponse.of(ErrorMessage.ENUM_VALUE_BAD_REQUEST)); } @ExceptionHandler(HandlerMethodValidationException.class) public ResponseEntity handleHandlerMethodValidationException(final HandlerMethodValidationException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(ErrorResponse.of(HttpStatus.BAD_REQUEST.value(), Objects.requireNonNull(e.getAllValidationResults().get(INDEX_ZERO).getResolvableErrors().get(INDEX_ZERO).getDefaultMessage()))); } @ExceptionHandler(MethodArgumentTypeMismatchException.class) public ResponseEntity handleMethodArgumentTypeMismatchException(final MethodArgumentTypeMismatchException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(ErrorResponse.of(ErrorMessage.REQUEST_URL_WRONG_ERROR)); } @ExceptionHandler(BadRequestException.class) public ResponseEntity handleBadRequestException(final BadRequestException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(ErrorResponse.of(e.getErrorMessage())); } @ExceptionHandler(UnauthorizedException.class) public ResponseEntity handleUnauthorizedException(final UnauthorizedException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.UNAUTHORIZED).body(ErrorResponse.of(e.getErrorMessage())); } @ExceptionHandler(JwtValidationException.class) public ResponseEntity handleJwtValidationException(final JwtValidationException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.UNAUTHORIZED).body(ErrorResponse.of(e.getErrorMessage())); } @ExceptionHandler(HttpRequestMethodNotSupportedException.class) public ResponseEntity handleHttpRequestMethodNotSupportedException(final HttpRequestMethodNotSupportedException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.METHOD_NOT_ALLOWED).body(ErrorResponse.of(ErrorMessage.METHOD_NOT_SUPPORTED)); } @ExceptionHandler(MethodArgumentNotValidException.class) protected ResponseEntity handleMethodArgumentNotValidException(final MethodArgumentNotValidException e) { + Sentry.captureException(e); FieldError fieldError = e.getBindingResult().getFieldError(); if (fieldError == null) return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(ErrorResponse.of(ErrorMessage.VALIDATION_REQUEST_MISSING_EXCEPTION)); @@ -84,31 +93,37 @@ protected ResponseEntity handleMethodArgumentNotValidException(fi @ExceptionHandler(ForbiddenException.class) public ResponseEntity handleForbiddenException(final ForbiddenException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.FORBIDDEN).body(ErrorResponse.of(e.getErrorMessage())); } @ExceptionHandler(NotFoundException.class) public ResponseEntity handleNotFoundException(final NotFoundException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.NOT_FOUND).body(ErrorResponse.of(e.getErrorMessage())); } @ExceptionHandler(ConflictException.class) public ResponseEntity handleConflictException(final ConflictException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.CONFLICT).body(ErrorResponse.of(e.getErrorMessage())); } @ExceptionHandler(TooManyRequestException.class) public ResponseEntity handleTooManyRequestException(final TooManyRequestException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.TOO_MANY_REQUESTS).body(ErrorResponse.of(e.getErrorMessage())); } @ExceptionHandler(NoHandlerFoundException.class) public ResponseEntity handleNoHandlerFoundException(final NoHandlerFoundException e) { + Sentry.captureException(e); return ResponseEntity.status(HttpStatus.NOT_FOUND).body(ErrorResponse.of(ErrorMessage.HANDLER_NOT_FOUND)); } @ExceptionHandler(Exception.class) protected ResponseEntity handleException(final Exception error, final HttpServletRequest request) { + Sentry.captureException(error); log.error("================================================NEW==============================================="); log.error(error.getMessage(), error); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(ErrorResponse.of(ErrorMessage.INTERNAL_SERVER_ERROR));