From aa738bf27e29191e686e19509526a77bad676ed8 Mon Sep 17 00:00:00 2001 From: SoohoLee Date: Mon, 10 Jul 2023 17:13:40 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=EB=88=84=EC=A0=81=20=EC=A0=91?= =?UTF-8?q?=EC=86=8D=EC=9E=90=20=ED=8C=8C=EC=95=85=EC=9D=84=20=EC=9C=84?= =?UTF-8?q?=ED=95=9C=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80=20(#355)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/controller/CommonController.java | 27 ++++--------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/src/main/java/project/trendpick_pro/domain/common/controller/CommonController.java b/src/main/java/project/trendpick_pro/domain/common/controller/CommonController.java index 56ece84a..97dddb31 100644 --- a/src/main/java/project/trendpick_pro/domain/common/controller/CommonController.java +++ b/src/main/java/project/trendpick_pro/domain/common/controller/CommonController.java @@ -1,33 +1,23 @@ package project.trendpick_pro.domain.common.controller; +import jakarta.servlet.http.HttpSession; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.core.io.Resource; -import org.springframework.core.io.UrlResource; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.util.UriComponentsBuilder; -import project.trendpick_pro.domain.common.base.filetranslator.FileTranslator; - -import java.net.MalformedURLException; +import project.trendpick_pro.domain.common.view.service.ViewService; @Slf4j @Controller @RequiredArgsConstructor public class CommonController { - private final FileTranslator fileTranslator; - - @ResponseBody - @GetMapping("/images/{filename}") - public Resource downloadImage(@PathVariable String filename) throws MalformedURLException { - return new UrlResource("file:" + fileTranslator.getFilePath(filename)); - } + private final ViewService viewService; @GetMapping("/") - public String index() { + public String index(HttpSession session) { + viewService.requestIncrementViewCount(session); String mainCategory = "전체"; String redirectUrl = UriComponentsBuilder .fromPath("/trendpick/products/list") @@ -36,11 +26,4 @@ public String index() { return "redirect:" + redirectUrl; } - - @GetMapping("/test") - public String test() { - return "trendpick/orders/standByOrder"; - } - - } From 3da0665841d75eae8250016492207f867a924a84 Mon Sep 17 00:00:00 2001 From: SoohoLee Date: Mon, 10 Jul 2023 17:38:38 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=EB=88=84=EC=A0=81=20=EC=A0=91?= =?UTF-8?q?=EC=86=8D=EC=9E=90=20=ED=8C=8C=EC=95=85=EC=9D=84=20=EC=9C=84?= =?UTF-8?q?=ED=95=9C=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80=20(#355)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 73c2c772..575f81e5 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -20,7 +20,7 @@ spring: password: ${custom.dataSource.password} jpa: hibernate: - ddl-auto: create + ddl-auto: update data: redis: host: ${redis.host} From a4682821c0222af6440dabcba841cf8a85782e3f Mon Sep 17 00:00:00 2001 From: SoohoLee Date: Mon, 10 Jul 2023 17:42:12 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=EB=88=84=EC=A0=81=20=EC=A0=91?= =?UTF-8?q?=EC=86=8D=EC=9E=90=20=ED=8C=8C=EC=95=85=EC=9D=84=20=EC=9C=84?= =?UTF-8?q?=ED=95=9C=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80=20(#355)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/project/trendpick_pro/global/basedata/BaseData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/project/trendpick_pro/global/basedata/BaseData.java b/src/main/java/project/trendpick_pro/global/basedata/BaseData.java index 246f11e6..7cdaa624 100644 --- a/src/main/java/project/trendpick_pro/global/basedata/BaseData.java +++ b/src/main/java/project/trendpick_pro/global/basedata/BaseData.java @@ -51,7 +51,7 @@ @Slf4j @Configuration -@Profile({"dev", "test", "prod"}) +@Profile({"dev", "test"}) public class BaseData { @Value("${tag}")