From f56ea775ea723e5ea02bb802af9a62b4c6bee3d4 Mon Sep 17 00:00:00 2001 From: hanueleee Date: Tue, 8 Aug 2023 18:01:31 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20ImageService=EC=99=80=20ImageUpload?= =?UTF-8?q?er=EC=9D=98=20=EC=9C=84=EC=B9=98=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../funeat/{review/application => common}/ImageService.java | 2 +- .../funeat/{review/application => common}/ImageUploader.java | 2 +- .../java/com/funeat/recipe/application/RecipeService.java | 2 +- .../java/com/funeat/review/application/ReviewService.java | 5 ++--- .../src/test/java/com/funeat/common/TestImageUploader.java | 1 - 5 files changed, 5 insertions(+), 7 deletions(-) rename backend/src/main/java/com/funeat/{review/application => common}/ImageService.java (77%) rename backend/src/main/java/com/funeat/{review/application => common}/ImageUploader.java (95%) diff --git a/backend/src/main/java/com/funeat/review/application/ImageService.java b/backend/src/main/java/com/funeat/common/ImageService.java similarity index 77% rename from backend/src/main/java/com/funeat/review/application/ImageService.java rename to backend/src/main/java/com/funeat/common/ImageService.java index 5b17a7565..3e8ad0cca 100644 --- a/backend/src/main/java/com/funeat/review/application/ImageService.java +++ b/backend/src/main/java/com/funeat/common/ImageService.java @@ -1,4 +1,4 @@ -package com.funeat.review.application; +package com.funeat.common; import org.springframework.web.multipart.MultipartFile; diff --git a/backend/src/main/java/com/funeat/review/application/ImageUploader.java b/backend/src/main/java/com/funeat/common/ImageUploader.java similarity index 95% rename from backend/src/main/java/com/funeat/review/application/ImageUploader.java rename to backend/src/main/java/com/funeat/common/ImageUploader.java index f7958e3b3..d3e26156e 100644 --- a/backend/src/main/java/com/funeat/review/application/ImageUploader.java +++ b/backend/src/main/java/com/funeat/common/ImageUploader.java @@ -1,4 +1,4 @@ -package com.funeat.review.application; +package com.funeat.common; import java.io.IOException; import java.nio.file.Files; diff --git a/backend/src/main/java/com/funeat/recipe/application/RecipeService.java b/backend/src/main/java/com/funeat/recipe/application/RecipeService.java index 6b854e458..7da1e0bd3 100644 --- a/backend/src/main/java/com/funeat/recipe/application/RecipeService.java +++ b/backend/src/main/java/com/funeat/recipe/application/RecipeService.java @@ -10,7 +10,7 @@ import com.funeat.recipe.dto.RecipeCreateRequest; import com.funeat.recipe.persistence.RecipeImageRepository; import com.funeat.recipe.persistence.RecipeRepository; -import com.funeat.review.application.ImageService; +import com.funeat.common.ImageService; import java.util.List; import java.util.Objects; import org.springframework.stereotype.Service; diff --git a/backend/src/main/java/com/funeat/review/application/ReviewService.java b/backend/src/main/java/com/funeat/review/application/ReviewService.java index b4b6a239c..6b9500c28 100644 --- a/backend/src/main/java/com/funeat/review/application/ReviewService.java +++ b/backend/src/main/java/com/funeat/review/application/ReviewService.java @@ -1,5 +1,6 @@ package com.funeat.review.application; +import com.funeat.common.ImageService; import com.funeat.member.domain.Member; import com.funeat.member.domain.favorite.ReviewFavorite; import com.funeat.member.persistence.MemberRepository; @@ -38,14 +39,12 @@ public class ReviewService { private final MemberRepository memberRepository; private final ProductRepository productRepository; private final ReviewFavoriteRepository reviewFavoriteRepository; - private final ImageService imageService; public ReviewService(final ReviewRepository reviewRepository, final TagRepository tagRepository, final ReviewTagRepository reviewTagRepository, final MemberRepository memberRepository, final ProductRepository productRepository, - final ReviewFavoriteRepository reviewFavoriteRepository, - final ImageService imageService) { + final ReviewFavoriteRepository reviewFavoriteRepository, final ImageService imageService) { this.reviewRepository = reviewRepository; this.tagRepository = tagRepository; this.reviewTagRepository = reviewTagRepository; diff --git a/backend/src/test/java/com/funeat/common/TestImageUploader.java b/backend/src/test/java/com/funeat/common/TestImageUploader.java index c47fa6b4d..c34c6cf99 100644 --- a/backend/src/test/java/com/funeat/common/TestImageUploader.java +++ b/backend/src/test/java/com/funeat/common/TestImageUploader.java @@ -1,6 +1,5 @@ package com.funeat.common; -import com.funeat.review.application.ImageService; import java.io.File; import java.io.IOException; import java.nio.file.Files;