From 8f1987caae694c03c451f5aa850a2f36b87d05d7 Mon Sep 17 00:00:00 2001 From: Jaewon Lee Date: Fri, 20 Sep 2024 12:58:16 +0900 Subject: [PATCH] =?UTF-8?q?refactor=20=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8?= =?UTF-8?q?=20=ED=8C=A8=ED=82=A4=EC=A7=80,=20=ED=81=B4=EB=9E=98=EC=8A=A4?= =?UTF-8?q?=20=EA=B5=AC=EC=A1=B0=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 웹만을 고려하지 않고 확장성 있는 의미로 web 패키지 -> api 패키지로 명칭 변경 - 영속성 관리 차원에서 persistence 패키지 내부에 rdbms, searchengine 패키지 이동 - logs 패키지는 controller에서 활용되는 부분이므로 api 패키지 하위로 이동 - security 관련 설정은 전 프로젝트를 아우르므로 common 패키지 하위에 security 패키지 생성 후 관리 예정 - 실제 외부 영속성과 통신하는 부분은 Repository로 끝나도록 명칭 변경 (예외는 존재) - 가독성 향상을 위해 adapter layer에서 명시적으로 entity 패키지를 생성하여 관리 - domain 패키지는 비즈니스 로직을 구현하는 부분인 application 패키지 내부로 이동하는게 더 자연스럽다는 의견 반영 --- .../webtoon-search/Dockerfile-spring-original | 16 -------- .../{common => adapter/api}/ApiResponse.java | 2 +- .../api}/logs/LoggingAspect.java | 6 +-- .../{web => api}/member/NaverUserInfo.java | 2 +- .../{web => api}/member/OAuth2UserInfo.java | 2 +- .../{web => api}/member/OAuthController.java | 2 +- .../{web => api}/member/PrincipalDetails.java | 2 +- .../webtoon/SearchWebtoonController.java | 4 +- .../webtoon/SearchWebtoonResponse.java | 2 +- .../webtoon/SelectRecordController.java | 4 +- .../webtoon/SelectRecordRequest.java | 2 +- .../persistence/MemberPersistenceAdapter.java | 7 ---- .../persistence/SearchPersistenceAdpater.java | 6 --- .../persistence/SelectPersistenceAdapter.java | 7 ---- .../rdbms/MemberJpaRepository.java | 8 ++++ .../rdbms/MemberRecordAdapter.java | 11 +++--- .../rdbms/SelectJpaRepository.java | 8 ++++ .../rdbms/SelectRecordAdapter.java | 9 ++--- .../entity}/RegisterMemberEntity.java | 2 +- .../entity}/SelectRecordEntity.java | 2 +- .../searchengine/SearchEngineAdapter.java | 38 +++---------------- .../SearchPersistenceAdapterEdit.java | 0 .../SearchWebtoonEntityEdit.java | 0 .../config/OpenSearchClientConfig.java | 6 +-- .../config/OpenSearchConfig.java | 0 .../entity}/SearchWebtoonEntity.java | 2 +- .../domain/MemberValidation.java | 2 +- .../domain/SearchableWebtoon.java | 2 +- .../service/PrincipalOauth2UserService.java | 6 +-- .../security}/config/SecurityConfig.java | 2 +- .../SearchWebtoonControllerUnitTest.java | 7 ++-- .../domain/SearchableWebtoonUnitTest.java | 1 + 32 files changed, 59 insertions(+), 111 deletions(-) delete mode 100644 webtoon-search-back/webtoon-search/Dockerfile-spring-original rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/{common => adapter/api}/ApiResponse.java (87%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/{common => adapter/api}/logs/LoggingAspect.java (89%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{web => api}/member/NaverUserInfo.java (95%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{web => api}/member/OAuth2UserInfo.java (82%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{web => api}/member/OAuthController.java (94%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{web => api}/member/PrincipalDetails.java (96%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{web => api}/webtoon/SearchWebtoonController.java (93%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{web => api}/webtoon/SearchWebtoonResponse.java (96%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{web => api}/webtoon/SelectRecordController.java (91%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{web => api}/webtoon/SelectRecordRequest.java (96%) delete mode 100644 webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/MemberPersistenceAdapter.java delete mode 100644 webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchPersistenceAdpater.java delete mode 100644 webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SelectPersistenceAdapter.java create mode 100644 webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/MemberJpaRepository.java rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{ => persistence}/rdbms/MemberRecordAdapter.java (76%) create mode 100644 webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/SelectJpaRepository.java rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{ => persistence}/rdbms/SelectRecordAdapter.java (69%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/{ => rdbms/entity}/RegisterMemberEntity.java (92%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/{ => rdbms/entity}/SelectRecordEntity.java (90%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{ => persistence}/searchengine/SearchEngineAdapter.java (79%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/{ => searchengine}/SearchPersistenceAdapterEdit.java (100%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/{ => searchengine}/SearchWebtoonEntityEdit.java (100%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{ => persistence/searchengine}/config/OpenSearchClientConfig.java (92%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/{ => persistence/searchengine}/config/OpenSearchConfig.java (100%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/{ => searchengine/entity}/SearchWebtoonEntity.java (85%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/{ => application}/domain/MemberValidation.java (79%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/{ => application}/domain/SearchableWebtoon.java (91%) rename webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/{adapter => common/security}/config/SecurityConfig.java (98%) rename webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/adapter/{web => api}/SearchWebtoonControllerUnitTest.java (94%) diff --git a/webtoon-search-back/webtoon-search/Dockerfile-spring-original b/webtoon-search-back/webtoon-search/Dockerfile-spring-original deleted file mode 100644 index c775454..0000000 --- a/webtoon-search-back/webtoon-search/Dockerfile-spring-original +++ /dev/null @@ -1,16 +0,0 @@ -FROM amazoncorretto:21-alpine-jdk - -WORKDIR /imageTest - -# 프로젝트 파일 복사 -COPY . . - -# gradlew에 실행 권한 부여 -RUN chmod +x ./gradlew - -# Gradle 빌드 실행 (셸을 명시적으로 지정) -RUN /bin/sh -c "./gradlew build --no-daemon" - -# JAR 파일 실행 -EXPOSE 8080 -CMD ["java", "-jar", "build/libs/webtoon-search-*.jar"] diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/common/ApiResponse.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/ApiResponse.java similarity index 87% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/common/ApiResponse.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/ApiResponse.java index 31c783c..cdc76be 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/common/ApiResponse.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/ApiResponse.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.common; +package com.samsamohoh.webtoonsearch.adapter.api; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/common/logs/LoggingAspect.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/logs/LoggingAspect.java similarity index 89% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/common/logs/LoggingAspect.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/logs/LoggingAspect.java index 8244149..a08274d 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/common/logs/LoggingAspect.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/logs/LoggingAspect.java @@ -1,6 +1,6 @@ -package com.samsamohoh.webtoonsearch.common.logs; +package com.samsamohoh.webtoonsearch.adapter.api.logs; -import com.samsamohoh.webtoonsearch.adapter.web.webtoon.SelectRecordRequest; +import com.samsamohoh.webtoonsearch.adapter.api.webtoon.SelectRecordRequest; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; @@ -19,7 +19,7 @@ @Slf4j public class LoggingAspect { - @Pointcut("execution(* com.samsamohoh.webtoonsearch.adapter.web.webtoon.SelectRecordController.*(..))") + @Pointcut("execution(* com.samsamohoh.webtoonsearch.adapter.api.webtoon.SelectRecordController.*(..))") public void activeLogPointcut() {} /* diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/NaverUserInfo.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/NaverUserInfo.java similarity index 95% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/NaverUserInfo.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/NaverUserInfo.java index 9658224..8e9c8d4 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/NaverUserInfo.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/NaverUserInfo.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.web.member; +package com.samsamohoh.webtoonsearch.adapter.api.member; import java.util.Map; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/OAuth2UserInfo.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/OAuth2UserInfo.java similarity index 82% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/OAuth2UserInfo.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/OAuth2UserInfo.java index 49a4757..c26d4e9 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/OAuth2UserInfo.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/OAuth2UserInfo.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.web.member; +package com.samsamohoh.webtoonsearch.adapter.api.member; import java.util.Map; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/OAuthController.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/OAuthController.java similarity index 94% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/OAuthController.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/OAuthController.java index a66ee1d..b09facd 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/OAuthController.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/OAuthController.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.web.member; +package com.samsamohoh.webtoonsearch.adapter.api.member; import lombok.RequiredArgsConstructor; import org.springframework.security.core.Authentication; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/PrincipalDetails.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/PrincipalDetails.java similarity index 96% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/PrincipalDetails.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/PrincipalDetails.java index 6ffb018..e31dafa 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/member/PrincipalDetails.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/member/PrincipalDetails.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.web.member; +package com.samsamohoh.webtoonsearch.adapter.api.member; import lombok.Getter; import lombok.ToString; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SearchWebtoonController.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SearchWebtoonController.java similarity index 93% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SearchWebtoonController.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SearchWebtoonController.java index e5b31e2..815d1e7 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SearchWebtoonController.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SearchWebtoonController.java @@ -1,9 +1,9 @@ -package com.samsamohoh.webtoonsearch.adapter.web.webtoon; +package com.samsamohoh.webtoonsearch.adapter.api.webtoon; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.SearchWebtoonCommand; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.WebtoonResult; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.SearchWebtoonUseCase; -import com.samsamohoh.webtoonsearch.common.ApiResponse; +import com.samsamohoh.webtoonsearch.adapter.api.ApiResponse; import io.micrometer.core.annotation.Counted; import io.micrometer.core.annotation.Timed; import lombok.RequiredArgsConstructor; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SearchWebtoonResponse.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SearchWebtoonResponse.java similarity index 96% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SearchWebtoonResponse.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SearchWebtoonResponse.java index f8fedc4..218b2a8 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SearchWebtoonResponse.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SearchWebtoonResponse.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.web.webtoon; +package com.samsamohoh.webtoonsearch.adapter.api.webtoon; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.WebtoonResult; import lombok.Value; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SelectRecordController.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SelectRecordController.java similarity index 91% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SelectRecordController.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SelectRecordController.java index 9ea3b18..09bc936 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SelectRecordController.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SelectRecordController.java @@ -1,8 +1,8 @@ -package com.samsamohoh.webtoonsearch.adapter.web.webtoon; +package com.samsamohoh.webtoonsearch.adapter.api.webtoon; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.SelectRecordUseCase; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.SelectWebtoonDTO; -import com.samsamohoh.webtoonsearch.common.ApiResponse; +import com.samsamohoh.webtoonsearch.adapter.api.ApiResponse; import io.micrometer.core.annotation.Counted; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.PostMapping; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SelectRecordRequest.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SelectRecordRequest.java similarity index 96% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SelectRecordRequest.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SelectRecordRequest.java index 8350198..944c375 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/web/webtoon/SelectRecordRequest.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/api/webtoon/SelectRecordRequest.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.web.webtoon; +package com.samsamohoh.webtoonsearch.adapter.api.webtoon; import lombok.Getter; import lombok.Value; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/MemberPersistenceAdapter.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/MemberPersistenceAdapter.java deleted file mode 100644 index 5149a1d..0000000 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/MemberPersistenceAdapter.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.samsamohoh.webtoonsearch.adapter.persistence; - -import org.springframework.data.jpa.repository.JpaRepository; - -public interface MemberPersistenceAdapter extends JpaRepository { - RegisterMemberEntity findByProviderId(String providerId); -} diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchPersistenceAdpater.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchPersistenceAdpater.java deleted file mode 100644 index 2b2026f..0000000 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchPersistenceAdpater.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.samsamohoh.webtoonsearch.adapter.persistence; - -public interface SearchPersistenceAdpater { - - -} diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SelectPersistenceAdapter.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SelectPersistenceAdapter.java deleted file mode 100644 index 5d1d566..0000000 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SelectPersistenceAdapter.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.samsamohoh.webtoonsearch.adapter.persistence; - -import org.springframework.data.jpa.repository.JpaRepository; - -public interface SelectPersistenceAdapter extends JpaRepository { - -} diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/MemberJpaRepository.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/MemberJpaRepository.java new file mode 100644 index 0000000..4619fb7 --- /dev/null +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/MemberJpaRepository.java @@ -0,0 +1,8 @@ +package com.samsamohoh.webtoonsearch.adapter.persistence.rdbms; + +import com.samsamohoh.webtoonsearch.adapter.persistence.rdbms.entity.RegisterMemberEntity; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface MemberJpaRepository extends JpaRepository { + RegisterMemberEntity findByProviderId(String providerId); +} diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/rdbms/MemberRecordAdapter.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/MemberRecordAdapter.java similarity index 76% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/rdbms/MemberRecordAdapter.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/MemberRecordAdapter.java index c0d1ab0..8ab4e6f 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/rdbms/MemberRecordAdapter.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/MemberRecordAdapter.java @@ -1,7 +1,6 @@ -package com.samsamohoh.webtoonsearch.adapter.rdbms; +package com.samsamohoh.webtoonsearch.adapter.persistence.rdbms; -import com.samsamohoh.webtoonsearch.adapter.persistence.MemberPersistenceAdapter; -import com.samsamohoh.webtoonsearch.adapter.persistence.RegisterMemberEntity; +import com.samsamohoh.webtoonsearch.adapter.persistence.rdbms.entity.RegisterMemberEntity; import com.samsamohoh.webtoonsearch.application.port.in.member.MemberResponseDTO; import com.samsamohoh.webtoonsearch.application.port.out.SaveMemberPort; import lombok.RequiredArgsConstructor; @@ -11,7 +10,7 @@ @RequiredArgsConstructor public class MemberRecordAdapter implements SaveMemberPort { - private final MemberPersistenceAdapter memberPersistenceAdapter; + private final MemberJpaRepository memberJpaRepository; @Override public MemberResponseDTO saveMember(MemberResponseDTO command) { @@ -24,14 +23,14 @@ public MemberResponseDTO saveMember(MemberResponseDTO command) { .provider(command.getProvider()) .build(); - memberPersistenceAdapter.save(entity); + memberJpaRepository.save(entity); return command; // 필요한 경우 savedEntity를 기반으로 새로운 DTO를 반환하도록 수정 } @Override public MemberResponseDTO findMemberByProviderId(String providerId) { - RegisterMemberEntity entity = memberPersistenceAdapter.findByProviderId(providerId); + RegisterMemberEntity entity = memberJpaRepository.findByProviderId(providerId); if (entity != null) { return new MemberResponseDTO( entity.getProviderId(), diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/SelectJpaRepository.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/SelectJpaRepository.java new file mode 100644 index 0000000..5b5d137 --- /dev/null +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/SelectJpaRepository.java @@ -0,0 +1,8 @@ +package com.samsamohoh.webtoonsearch.adapter.persistence.rdbms; + +import com.samsamohoh.webtoonsearch.adapter.persistence.rdbms.entity.SelectRecordEntity; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface SelectJpaRepository extends JpaRepository { + +} diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/rdbms/SelectRecordAdapter.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/SelectRecordAdapter.java similarity index 69% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/rdbms/SelectRecordAdapter.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/SelectRecordAdapter.java index e68aa12..11d80e4 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/rdbms/SelectRecordAdapter.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/SelectRecordAdapter.java @@ -1,7 +1,6 @@ -package com.samsamohoh.webtoonsearch.adapter.rdbms; +package com.samsamohoh.webtoonsearch.adapter.persistence.rdbms; -import com.samsamohoh.webtoonsearch.adapter.persistence.SelectPersistenceAdapter; -import com.samsamohoh.webtoonsearch.adapter.persistence.SelectRecordEntity; +import com.samsamohoh.webtoonsearch.adapter.persistence.rdbms.entity.SelectRecordEntity; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.SelectWebtoonDTO; import com.samsamohoh.webtoonsearch.application.port.out.AddRecordPort; import lombok.RequiredArgsConstructor; @@ -12,13 +11,13 @@ @RequiredArgsConstructor public class SelectRecordAdapter implements AddRecordPort { - private final SelectPersistenceAdapter selectPersistenceAdapter; + private final SelectJpaRepository selectJpaRepository; @Override public boolean addRecord(SelectWebtoonDTO data) { try { - selectPersistenceAdapter.save(toEntity(data)); + selectJpaRepository.save(toEntity(data)); return true; } catch(Exception e) { diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/RegisterMemberEntity.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/entity/RegisterMemberEntity.java similarity index 92% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/RegisterMemberEntity.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/entity/RegisterMemberEntity.java index 75f6d10..dad5a15 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/RegisterMemberEntity.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/entity/RegisterMemberEntity.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.persistence; +package com.samsamohoh.webtoonsearch.adapter.persistence.rdbms.entity; import jakarta.persistence.*; import lombok.Builder; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SelectRecordEntity.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/entity/SelectRecordEntity.java similarity index 90% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SelectRecordEntity.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/entity/SelectRecordEntity.java index 78e95a2..717946d 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SelectRecordEntity.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/rdbms/entity/SelectRecordEntity.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.persistence; +package com.samsamohoh.webtoonsearch.adapter.persistence.rdbms.entity; import jakarta.persistence.*; import lombok.AllArgsConstructor; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/searchengine/SearchEngineAdapter.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/SearchEngineAdapter.java similarity index 79% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/searchengine/SearchEngineAdapter.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/SearchEngineAdapter.java index 8e18f13..28e7b15 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/searchengine/SearchEngineAdapter.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/SearchEngineAdapter.java @@ -1,34 +1,30 @@ -package com.samsamohoh.webtoonsearch.adapter.searchengine; +package com.samsamohoh.webtoonsearch.adapter.persistence.searchengine; -import com.samsamohoh.webtoonsearch.adapter.persistence.SearchWebtoonEntity; +import com.samsamohoh.webtoonsearch.adapter.persistence.searchengine.entity.SearchWebtoonEntity; +import com.samsamohoh.webtoonsearch.application.port.in.webtoon.LoadWebtoonQuery; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.WebtoonResult; import com.samsamohoh.webtoonsearch.application.port.out.LoadWebtoonPort; -import com.samsamohoh.webtoonsearch.application.port.in.webtoon.LoadWebtoonQuery; import com.samsamohoh.webtoonsearch.common.metrics.CustomMetrics; import io.micrometer.core.annotation.Timed; -//import org.springframework.dao.DataAccessResourceFailureException; import io.micrometer.core.instrument.Tag; import lombok.RequiredArgsConstructor; import org.opensearch.client.opensearch.OpenSearchClient; import org.opensearch.client.opensearch.core.SearchRequest; import org.opensearch.client.opensearch.core.SearchResponse; -import org.opensearch.client.opensearch.core.search.Hit; import org.springframework.dao.DataAccessResourceFailureException; import org.springframework.stereotype.Component; import java.io.IOException; -import java.util.List; import java.util.ArrayList; import java.util.Arrays; -import java.util.stream.Collectors; +import java.util.List; @Component @RequiredArgsConstructor -//@RequiredArgsConstructor public class SearchEngineAdapter implements LoadWebtoonPort { - // private final SearchPersistenceAdapter searchPersistenceAdapter; - private final CustomMetrics customMetrics; + private final OpenSearchClient openSearchClient; + private final CustomMetrics customMetrics; @Override @Timed(value = "search.opensearch.reply.duration", @@ -58,28 +54,6 @@ public WebtoonResult loadWebtoons(LoadWebtoonQuery term) { } } - // String searchTerm = query.getSearchTerm(); -// -// try { -// List entities = searchPersistenceAdapter.searchAll(searchTerm); -// -// List webtoons = entities.stream() -// .map(this::mapToWebtoonDTO) -// .collect(Collectors.toList()); -// -// return new WebtoonResult(webtoons); -// -// } catch(DataAccessResourceFailureException e) { -// customMetrics.getCounter("opensearch.connection.fail.count" -// ,"metrics for opensearch connecting failure" -// , Arrays.asList(Tag.of("class","search-engine-adapter"), -// Tag.of("method","load-webtoons"), -// Tag.of("endpoint","/webtoons/search"))).increment(); -// throw new DataAccessResourceFailureException(e.getMessage()); -// } -// return null; -// } -// // OpenSearch한테 요청을 보내는 쿼리문 private SearchRequest createSearchRequest(String searchTerm) { diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchPersistenceAdapterEdit.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/SearchPersistenceAdapterEdit.java similarity index 100% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchPersistenceAdapterEdit.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/SearchPersistenceAdapterEdit.java diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchWebtoonEntityEdit.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/SearchWebtoonEntityEdit.java similarity index 100% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchWebtoonEntityEdit.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/SearchWebtoonEntityEdit.java diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/config/OpenSearchClientConfig.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/config/OpenSearchClientConfig.java similarity index 92% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/config/OpenSearchClientConfig.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/config/OpenSearchClientConfig.java index 82a626f..be6eb73 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/config/OpenSearchClientConfig.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/config/OpenSearchClientConfig.java @@ -1,8 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.config; - -import java.security.KeyManagementException; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; +package com.samsamohoh.webtoonsearch.adapter.persistence.searchengine.config; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.http.HttpHost; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/config/OpenSearchConfig.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/config/OpenSearchConfig.java similarity index 100% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/config/OpenSearchConfig.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/config/OpenSearchConfig.java diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchWebtoonEntity.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/entity/SearchWebtoonEntity.java similarity index 85% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchWebtoonEntity.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/entity/SearchWebtoonEntity.java index 14c14ae..2c1e7ca 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/SearchWebtoonEntity.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/persistence/searchengine/entity/SearchWebtoonEntity.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.persistence; +package com.samsamohoh.webtoonsearch.adapter.persistence.searchengine.entity; import lombok.Getter; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/domain/MemberValidation.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/application/domain/MemberValidation.java similarity index 79% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/domain/MemberValidation.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/application/domain/MemberValidation.java index d8877e3..5cfb4ef 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/domain/MemberValidation.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/application/domain/MemberValidation.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.domain; +package com.samsamohoh.webtoonsearch.application.domain; import lombok.Builder; import lombok.Value; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/domain/SearchableWebtoon.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/application/domain/SearchableWebtoon.java similarity index 91% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/domain/SearchableWebtoon.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/application/domain/SearchableWebtoon.java index f45ad97..bad7778 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/domain/SearchableWebtoon.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/application/domain/SearchableWebtoon.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.domain; +package com.samsamohoh.webtoonsearch.application.domain; import lombok.Builder; import lombok.Value; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/application/service/PrincipalOauth2UserService.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/application/service/PrincipalOauth2UserService.java index ad1eb8b..86a1eed 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/application/service/PrincipalOauth2UserService.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/application/service/PrincipalOauth2UserService.java @@ -1,8 +1,8 @@ package com.samsamohoh.webtoonsearch.application.service; -import com.samsamohoh.webtoonsearch.adapter.web.member.NaverUserInfo; -import com.samsamohoh.webtoonsearch.adapter.web.member.OAuth2UserInfo; -import com.samsamohoh.webtoonsearch.adapter.web.member.PrincipalDetails; +import com.samsamohoh.webtoonsearch.adapter.api.member.NaverUserInfo; +import com.samsamohoh.webtoonsearch.adapter.api.member.OAuth2UserInfo; +import com.samsamohoh.webtoonsearch.adapter.api.member.PrincipalDetails; import com.samsamohoh.webtoonsearch.application.port.in.member.MemberResponseDTO; import com.samsamohoh.webtoonsearch.application.port.out.SaveMemberPort; import lombok.RequiredArgsConstructor; diff --git a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/config/SecurityConfig.java b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/common/security/config/SecurityConfig.java similarity index 98% rename from webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/config/SecurityConfig.java rename to webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/common/security/config/SecurityConfig.java index 61afc3c..8a29fa3 100644 --- a/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/adapter/config/SecurityConfig.java +++ b/webtoon-search-back/webtoon-search/src/main/java/com/samsamohoh/webtoonsearch/common/security/config/SecurityConfig.java @@ -1,4 +1,4 @@ -package com.samsamohoh.webtoonsearch.adapter.config; +package com.samsamohoh.webtoonsearch.common.security.config; import com.samsamohoh.webtoonsearch.application.port.out.SaveMemberPort; import com.samsamohoh.webtoonsearch.application.service.PrincipalOauth2UserService; diff --git a/webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/adapter/web/SearchWebtoonControllerUnitTest.java b/webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/adapter/api/SearchWebtoonControllerUnitTest.java similarity index 94% rename from webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/adapter/web/SearchWebtoonControllerUnitTest.java rename to webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/adapter/api/SearchWebtoonControllerUnitTest.java index 2e93d2d..cbae0fc 100644 --- a/webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/adapter/web/SearchWebtoonControllerUnitTest.java +++ b/webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/adapter/api/SearchWebtoonControllerUnitTest.java @@ -1,11 +1,10 @@ -package com.samsamohoh.webtoonsearch.adapter.web; +package com.samsamohoh.webtoonsearch.adapter.api; -import com.samsamohoh.webtoonsearch.adapter.web.webtoon.SearchWebtoonController; -import com.samsamohoh.webtoonsearch.adapter.web.webtoon.SearchWebtoonResponse; +import com.samsamohoh.webtoonsearch.adapter.api.webtoon.SearchWebtoonController; +import com.samsamohoh.webtoonsearch.adapter.api.webtoon.SearchWebtoonResponse; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.SearchWebtoonCommand; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.SearchWebtoonUseCase; import com.samsamohoh.webtoonsearch.application.port.in.webtoon.WebtoonResult; -import com.samsamohoh.webtoonsearch.common.ApiResponse; import org.junit.jupiter.api.*; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; diff --git a/webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/domain/SearchableWebtoonUnitTest.java b/webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/domain/SearchableWebtoonUnitTest.java index 23d3045..2d100f2 100644 --- a/webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/domain/SearchableWebtoonUnitTest.java +++ b/webtoon-search-back/webtoon-search/src/test/java/com/samsamohoh/webtoonsearch/domain/SearchableWebtoonUnitTest.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.json.JsonMapper; +import com.samsamohoh.webtoonsearch.application.domain.SearchableWebtoon; import org.junit.jupiter.api.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory;