From 954036eef19e6b82008d6c51dfb6e7d9658b621f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=9C=EA=B4=80=ED=9D=AC?= Date: Thu, 26 Sep 2024 15:10:46 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=8C=A8=ED=82=A4=EC=A7=80=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=20=EC=9D=BC=EB=B6=80=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stempo/api/domain/application/service/BoardService.java | 2 +- .../api/domain/application/service/BoardServiceImpl.java | 2 +- .../api/domain/application/service/HomeworkService.java | 2 +- .../api/domain/application/service/HomeworkServiceImpl.java | 2 +- .../com/stempo/api/domain/presentation/AuthController.java | 2 +- .../com/stempo/api/domain/presentation/BoardController.java | 4 ++-- .../com/stempo/api/domain/presentation/FileController.java | 2 +- .../stempo/api/domain/presentation/HomeworkController.java | 4 ++-- .../com/stempo/api/domain/presentation/RecordController.java | 2 +- .../com/stempo/api/domain/presentation/RhythmController.java | 2 +- .../com/stempo/api/global/{common => }/dto/ApiResponse.java | 2 +- .../com/stempo/api/global/{common => }/dto/ErrorResponse.java | 2 +- .../stempo/api/global/{common => }/dto/PagedResponseDto.java | 2 +- .../com/stempo/api/global/handler/GlobalExceptionHandler.java | 4 ++-- src/main/java/com/stempo/api/global/util/ResponseUtil.java | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) rename src/main/java/com/stempo/api/global/{common => }/dto/ApiResponse.java (95%) rename src/main/java/com/stempo/api/global/{common => }/dto/ErrorResponse.java (93%) rename src/main/java/com/stempo/api/global/{common => }/dto/PagedResponseDto.java (97%) diff --git a/src/main/java/com/stempo/api/domain/application/service/BoardService.java b/src/main/java/com/stempo/api/domain/application/service/BoardService.java index 4c2ba6ce..98a964b4 100644 --- a/src/main/java/com/stempo/api/domain/application/service/BoardService.java +++ b/src/main/java/com/stempo/api/domain/application/service/BoardService.java @@ -4,7 +4,7 @@ import com.stempo.api.domain.presentation.dto.request.BoardRequestDto; import com.stempo.api.domain.presentation.dto.request.BoardUpdateRequestDto; import com.stempo.api.domain.presentation.dto.response.BoardResponseDto; -import com.stempo.api.global.common.dto.PagedResponseDto; +import com.stempo.api.global.dto.PagedResponseDto; import org.springframework.data.domain.Pageable; public interface BoardService { diff --git a/src/main/java/com/stempo/api/domain/application/service/BoardServiceImpl.java b/src/main/java/com/stempo/api/domain/application/service/BoardServiceImpl.java index 6b7981d5..d024c7a4 100644 --- a/src/main/java/com/stempo/api/domain/application/service/BoardServiceImpl.java +++ b/src/main/java/com/stempo/api/domain/application/service/BoardServiceImpl.java @@ -7,7 +7,7 @@ import com.stempo.api.domain.presentation.dto.request.BoardRequestDto; import com.stempo.api.domain.presentation.dto.request.BoardUpdateRequestDto; import com.stempo.api.domain.presentation.dto.response.BoardResponseDto; -import com.stempo.api.global.common.dto.PagedResponseDto; +import com.stempo.api.global.dto.PagedResponseDto; import com.stempo.api.global.exception.PermissionDeniedException; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; diff --git a/src/main/java/com/stempo/api/domain/application/service/HomeworkService.java b/src/main/java/com/stempo/api/domain/application/service/HomeworkService.java index d1cba45f..d54489ae 100644 --- a/src/main/java/com/stempo/api/domain/application/service/HomeworkService.java +++ b/src/main/java/com/stempo/api/domain/application/service/HomeworkService.java @@ -3,7 +3,7 @@ import com.stempo.api.domain.presentation.dto.request.HomeworkRequestDto; import com.stempo.api.domain.presentation.dto.request.HomeworkUpdateRequestDto; import com.stempo.api.domain.presentation.dto.response.HomeworkResponseDto; -import com.stempo.api.global.common.dto.PagedResponseDto; +import com.stempo.api.global.dto.PagedResponseDto; import org.springframework.data.domain.Pageable; public interface HomeworkService { diff --git a/src/main/java/com/stempo/api/domain/application/service/HomeworkServiceImpl.java b/src/main/java/com/stempo/api/domain/application/service/HomeworkServiceImpl.java index fce2157b..7a1de4be 100644 --- a/src/main/java/com/stempo/api/domain/application/service/HomeworkServiceImpl.java +++ b/src/main/java/com/stempo/api/domain/application/service/HomeworkServiceImpl.java @@ -5,7 +5,7 @@ import com.stempo.api.domain.presentation.dto.request.HomeworkRequestDto; import com.stempo.api.domain.presentation.dto.request.HomeworkUpdateRequestDto; import com.stempo.api.domain.presentation.dto.response.HomeworkResponseDto; -import com.stempo.api.global.common.dto.PagedResponseDto; +import com.stempo.api.global.dto.PagedResponseDto; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; diff --git a/src/main/java/com/stempo/api/domain/presentation/AuthController.java b/src/main/java/com/stempo/api/domain/presentation/AuthController.java index bca1887c..3c7c701f 100644 --- a/src/main/java/com/stempo/api/domain/presentation/AuthController.java +++ b/src/main/java/com/stempo/api/domain/presentation/AuthController.java @@ -3,7 +3,7 @@ import com.stempo.api.domain.application.service.AuthService; import com.stempo.api.domain.presentation.dto.request.AuthRequestDto; import com.stempo.api.domain.presentation.dto.response.TokenInfo; -import com.stempo.api.global.common.dto.ApiResponse; +import com.stempo.api.global.dto.ApiResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.servlet.http.HttpServletRequest; diff --git a/src/main/java/com/stempo/api/domain/presentation/BoardController.java b/src/main/java/com/stempo/api/domain/presentation/BoardController.java index 7a10b4d0..a73e6e83 100644 --- a/src/main/java/com/stempo/api/domain/presentation/BoardController.java +++ b/src/main/java/com/stempo/api/domain/presentation/BoardController.java @@ -5,8 +5,8 @@ import com.stempo.api.domain.presentation.dto.request.BoardRequestDto; import com.stempo.api.domain.presentation.dto.request.BoardUpdateRequestDto; import com.stempo.api.domain.presentation.dto.response.BoardResponseDto; -import com.stempo.api.global.common.dto.ApiResponse; -import com.stempo.api.global.common.dto.PagedResponseDto; +import com.stempo.api.global.dto.ApiResponse; +import com.stempo.api.global.dto.PagedResponseDto; import com.stempo.api.global.exception.InvalidColumnException; import com.stempo.api.global.exception.SortingArgumentException; import com.stempo.api.global.util.PageableUtil; diff --git a/src/main/java/com/stempo/api/domain/presentation/FileController.java b/src/main/java/com/stempo/api/domain/presentation/FileController.java index d3f0e16e..62dd741e 100644 --- a/src/main/java/com/stempo/api/domain/presentation/FileController.java +++ b/src/main/java/com/stempo/api/domain/presentation/FileController.java @@ -1,7 +1,7 @@ package com.stempo.api.domain.presentation; import com.stempo.api.domain.application.service.FileService; -import com.stempo.api.global.common.dto.ApiResponse; +import com.stempo.api.global.dto.ApiResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/stempo/api/domain/presentation/HomeworkController.java b/src/main/java/com/stempo/api/domain/presentation/HomeworkController.java index 2b78b120..089a3bfb 100644 --- a/src/main/java/com/stempo/api/domain/presentation/HomeworkController.java +++ b/src/main/java/com/stempo/api/domain/presentation/HomeworkController.java @@ -4,8 +4,8 @@ import com.stempo.api.domain.presentation.dto.request.HomeworkRequestDto; import com.stempo.api.domain.presentation.dto.request.HomeworkUpdateRequestDto; import com.stempo.api.domain.presentation.dto.response.HomeworkResponseDto; -import com.stempo.api.global.common.dto.ApiResponse; -import com.stempo.api.global.common.dto.PagedResponseDto; +import com.stempo.api.global.dto.ApiResponse; +import com.stempo.api.global.dto.PagedResponseDto; import com.stempo.api.global.exception.InvalidColumnException; import com.stempo.api.global.exception.SortingArgumentException; import com.stempo.api.global.util.PageableUtil; diff --git a/src/main/java/com/stempo/api/domain/presentation/RecordController.java b/src/main/java/com/stempo/api/domain/presentation/RecordController.java index 3a2e5c07..476098d0 100644 --- a/src/main/java/com/stempo/api/domain/presentation/RecordController.java +++ b/src/main/java/com/stempo/api/domain/presentation/RecordController.java @@ -3,7 +3,7 @@ import com.stempo.api.domain.application.service.RecordService; import com.stempo.api.domain.presentation.dto.request.RecordRequestDto; import com.stempo.api.domain.presentation.dto.response.RecordResponseDto; -import com.stempo.api.global.common.dto.ApiResponse; +import com.stempo.api.global.dto.ApiResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/stempo/api/domain/presentation/RhythmController.java b/src/main/java/com/stempo/api/domain/presentation/RhythmController.java index 2263bc60..41413d23 100644 --- a/src/main/java/com/stempo/api/domain/presentation/RhythmController.java +++ b/src/main/java/com/stempo/api/domain/presentation/RhythmController.java @@ -2,7 +2,7 @@ import com.stempo.api.domain.application.service.RhythmService; import com.stempo.api.domain.presentation.dto.request.RhythmRequestDto; -import com.stempo.api.global.common.dto.ApiResponse; +import com.stempo.api.global.dto.ApiResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/stempo/api/global/common/dto/ApiResponse.java b/src/main/java/com/stempo/api/global/dto/ApiResponse.java similarity index 95% rename from src/main/java/com/stempo/api/global/common/dto/ApiResponse.java rename to src/main/java/com/stempo/api/global/dto/ApiResponse.java index 4c18ef41..c070a580 100644 --- a/src/main/java/com/stempo/api/global/common/dto/ApiResponse.java +++ b/src/main/java/com/stempo/api/global/dto/ApiResponse.java @@ -1,4 +1,4 @@ -package com.stempo.api.global.common.dto; +package com.stempo.api.global.dto; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/src/main/java/com/stempo/api/global/common/dto/ErrorResponse.java b/src/main/java/com/stempo/api/global/dto/ErrorResponse.java similarity index 93% rename from src/main/java/com/stempo/api/global/common/dto/ErrorResponse.java rename to src/main/java/com/stempo/api/global/dto/ErrorResponse.java index 8ef5d81d..a244b84d 100644 --- a/src/main/java/com/stempo/api/global/common/dto/ErrorResponse.java +++ b/src/main/java/com/stempo/api/global/dto/ErrorResponse.java @@ -1,4 +1,4 @@ -package com.stempo.api.global.common.dto; +package com.stempo.api.global.dto; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/src/main/java/com/stempo/api/global/common/dto/PagedResponseDto.java b/src/main/java/com/stempo/api/global/dto/PagedResponseDto.java similarity index 97% rename from src/main/java/com/stempo/api/global/common/dto/PagedResponseDto.java rename to src/main/java/com/stempo/api/global/dto/PagedResponseDto.java index eb6bbd46..cb79afb9 100644 --- a/src/main/java/com/stempo/api/global/common/dto/PagedResponseDto.java +++ b/src/main/java/com/stempo/api/global/dto/PagedResponseDto.java @@ -1,4 +1,4 @@ -package com.stempo.api.global.common.dto; +package com.stempo.api.global.dto; import lombok.Getter; import org.springframework.data.domain.Page; diff --git a/src/main/java/com/stempo/api/global/handler/GlobalExceptionHandler.java b/src/main/java/com/stempo/api/global/handler/GlobalExceptionHandler.java index de4b9ac0..4cea60dc 100644 --- a/src/main/java/com/stempo/api/global/handler/GlobalExceptionHandler.java +++ b/src/main/java/com/stempo/api/global/handler/GlobalExceptionHandler.java @@ -9,8 +9,8 @@ import com.stempo.api.global.auth.exception.TokenForgeryException; import com.stempo.api.global.auth.exception.TokenNotFoundException; import com.stempo.api.global.auth.exception.TokenValidateException; -import com.stempo.api.global.common.dto.ApiResponse; -import com.stempo.api.global.common.dto.ErrorResponse; +import com.stempo.api.global.dto.ApiResponse; +import com.stempo.api.global.dto.ErrorResponse; import com.stempo.api.global.exception.InvalidColumnException; import com.stempo.api.global.exception.NotFoundException; import com.stempo.api.global.exception.PermissionDeniedException; diff --git a/src/main/java/com/stempo/api/global/util/ResponseUtil.java b/src/main/java/com/stempo/api/global/util/ResponseUtil.java index 58cb6de4..44048342 100644 --- a/src/main/java/com/stempo/api/global/util/ResponseUtil.java +++ b/src/main/java/com/stempo/api/global/util/ResponseUtil.java @@ -1,6 +1,6 @@ package com.stempo.api.global.util; -import com.stempo.api.global.common.dto.ApiResponse; +import com.stempo.api.global.dto.ApiResponse; import jakarta.servlet.http.HttpServletResponse; import java.io.IOException;