From 329c88b16cfbdc46daa2d21d3f80cb4ce4933bdd Mon Sep 17 00:00:00 2001 From: junwon <67488973+wjdwnsdnjs13@users.noreply.github.com> Date: Sat, 14 Sep 2024 12:15:01 +0900 Subject: [PATCH] [NO-JIRA] mixpanel remove (#198) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor : mixpanel 제거 * refactor : 커넥션 풀 50개 --- .../review/CreateReviewController.java | 12 +++++------- .../review/ReadReviewController.java | 12 +++++------- .../review/like/ReviewLikeController.java | 18 ++++++++---------- .../review/scrap/ReviewScrapController.java | 12 +++++------- .../src/main/resources/application-jpa.yaml | 2 +- 5 files changed, 24 insertions(+), 32 deletions(-) diff --git a/application/src/main/java/org/depromeet/spot/application/review/CreateReviewController.java b/application/src/main/java/org/depromeet/spot/application/review/CreateReviewController.java index 1005d089..5d9ec5e9 100644 --- a/application/src/main/java/org/depromeet/spot/application/review/CreateReviewController.java +++ b/application/src/main/java/org/depromeet/spot/application/review/CreateReviewController.java @@ -13,9 +13,6 @@ import org.depromeet.spot.application.review.dto.response.BaseReviewResponse; import org.depromeet.spot.usecase.port.in.review.CreateReviewUsecase; import org.depromeet.spot.usecase.port.in.review.CreateReviewUsecase.CreateReviewResult; -import org.depromeet.spot.usecase.service.event.MixpanelEvent; -import org.depromeet.spot.usecase.service.event.MixpanelEvent.MixpanelEventName; -import org.springframework.context.ApplicationEventPublisher; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -39,7 +36,7 @@ @RequestMapping("/api/v1") public class CreateReviewController { - private final ApplicationEventPublisher applicationEventPublisher; + // private final ApplicationEventPublisher applicationEventPublisher; private final CreateReviewUsecase createReviewUsecase; @@ -55,9 +52,10 @@ public BaseReviewResponse create( CreateReviewResult result = createReviewUsecase.create(blockId, memberId, request.toCommand()); - // 믹스패널 이벤트(후기 등록 완료) 호출 - applicationEventPublisher.publishEvent( - new MixpanelEvent(MixpanelEventName.REVIEW_REGISTER, String.valueOf(memberId))); + // // 믹스패널 이벤트(후기 등록 완료) 호출 + // applicationEventPublisher.publishEvent( + // new MixpanelEvent(MixpanelEventName.REVIEW_REGISTER, + // String.valueOf(memberId))); return BaseReviewResponse.from(result); } diff --git a/application/src/main/java/org/depromeet/spot/application/review/ReadReviewController.java b/application/src/main/java/org/depromeet/spot/application/review/ReadReviewController.java index 02a29cc0..260b8d0d 100644 --- a/application/src/main/java/org/depromeet/spot/application/review/ReadReviewController.java +++ b/application/src/main/java/org/depromeet/spot/application/review/ReadReviewController.java @@ -22,9 +22,6 @@ import org.depromeet.spot.usecase.port.in.review.ReadReviewUsecase.MyRecentReviewResult; import org.depromeet.spot.usecase.port.in.review.ReadReviewUsecase.MyReviewListResult; import org.depromeet.spot.usecase.port.in.review.ReadReviewUsecase.ReadReviewResult; -import org.depromeet.spot.usecase.service.event.MixpanelEvent; -import org.depromeet.spot.usecase.service.event.MixpanelEvent.MixpanelEventName; -import org.springframework.context.ApplicationEventPublisher; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; @@ -39,7 +36,7 @@ @RequestMapping("/api/v1") public class ReadReviewController { - private final ApplicationEventPublisher applicationEventPublisher; + // private final ApplicationEventPublisher applicationEventPublisher; private final ReadReviewUsecase readReviewUsecase; @@ -138,9 +135,10 @@ public BaseReviewResponse findReviewByReviewId( Long reviewId) { ReadReviewResult readReviewResult = readReviewUsecase.findReviewById(reviewId, memberId); - // 믹스패널 이벤트(조회수) 발생 - applicationEventPublisher.publishEvent( - new MixpanelEvent(MixpanelEventName.REVIEW_OPEN_COUNT, String.valueOf(memberId))); + // // 믹스패널 이벤트(조회수) 발생 + // applicationEventPublisher.publishEvent( + // new MixpanelEvent(MixpanelEventName.REVIEW_OPEN_COUNT, + // String.valueOf(memberId))); return BaseReviewResponse.from(readReviewResult.review()); } diff --git a/application/src/main/java/org/depromeet/spot/application/review/like/ReviewLikeController.java b/application/src/main/java/org/depromeet/spot/application/review/like/ReviewLikeController.java index 8959d3a2..b3ffae05 100644 --- a/application/src/main/java/org/depromeet/spot/application/review/like/ReviewLikeController.java +++ b/application/src/main/java/org/depromeet/spot/application/review/like/ReviewLikeController.java @@ -5,9 +5,6 @@ import org.depromeet.spot.application.common.annotation.CurrentMember; import org.depromeet.spot.usecase.port.in.review.like.ReviewLikeUsecase; -import org.depromeet.spot.usecase.service.event.MixpanelEvent; -import org.depromeet.spot.usecase.service.event.MixpanelEvent.MixpanelEventName; -import org.springframework.context.ApplicationEventPublisher; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -26,7 +23,7 @@ @RequestMapping("/api/v1/reviews") public class ReviewLikeController { - private final ApplicationEventPublisher applicationEventPublisher; + // private final ApplicationEventPublisher applicationEventPublisher; private final ReviewLikeUsecase reviewLikeUsecase; @@ -38,11 +35,12 @@ public void toggleLike( @PathVariable @Positive @NotNull final Long reviewId, @Parameter(hidden = true) Long memberId) { boolean result = reviewLikeUsecase.toggleLike(memberId, reviewId); - if (result) { - // 리뷰 공감 추이 이벤트 발생 - applicationEventPublisher.publishEvent( - new MixpanelEvent( - MixpanelEventName.REVIEW_LIKE_COUNT, String.valueOf(memberId))); - } + // if (result) { + // // 리뷰 공감 추이 이벤트 발생 + // applicationEventPublisher.publishEvent( + // new MixpanelEvent( + // MixpanelEventName.REVIEW_LIKE_COUNT, + // String.valueOf(memberId))); + // } } } diff --git a/application/src/main/java/org/depromeet/spot/application/review/scrap/ReviewScrapController.java b/application/src/main/java/org/depromeet/spot/application/review/scrap/ReviewScrapController.java index 02a1cde3..fafa155a 100644 --- a/application/src/main/java/org/depromeet/spot/application/review/scrap/ReviewScrapController.java +++ b/application/src/main/java/org/depromeet/spot/application/review/scrap/ReviewScrapController.java @@ -10,9 +10,6 @@ import org.depromeet.spot.application.review.dto.response.scrap.MyScrapListResponse; import org.depromeet.spot.usecase.port.in.review.scrap.ReviewScrapUsecase; import org.depromeet.spot.usecase.port.in.review.scrap.ReviewScrapUsecase.MyScrapListResult; -import org.depromeet.spot.usecase.service.event.MixpanelEvent; -import org.depromeet.spot.usecase.service.event.MixpanelEvent.MixpanelEventName; -import org.springframework.context.ApplicationEventPublisher; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -32,7 +29,7 @@ @RequestMapping("/api/v1/reviews") public class ReviewScrapController { - private final ApplicationEventPublisher applicationEventPublisher; + // private final ApplicationEventPublisher applicationEventPublisher; private final ReviewScrapUsecase reviewScrapUsecase; @@ -45,9 +42,10 @@ public boolean toggleScrap( @Parameter(hidden = true) Long memberId) { boolean result = reviewScrapUsecase.toggleScrap(memberId, reviewId); - // 믹스패널 이벤트(스크랩 수) 발생 - applicationEventPublisher.publishEvent( - new MixpanelEvent(MixpanelEventName.REVIEW_SCRAP_COUNT, String.valueOf(memberId))); + // // 믹스패널 이벤트(스크랩 수) 발생 + // applicationEventPublisher.publishEvent( + // new MixpanelEvent(MixpanelEventName.REVIEW_SCRAP_COUNT, + // String.valueOf(memberId))); return result; } diff --git a/infrastructure/src/main/resources/application-jpa.yaml b/infrastructure/src/main/resources/application-jpa.yaml index 4ae3588d..544846e5 100644 --- a/infrastructure/src/main/resources/application-jpa.yaml +++ b/infrastructure/src/main/resources/application-jpa.yaml @@ -5,7 +5,7 @@ spring: password: ${DB_PASSWORD} driver-class-name: com.mysql.cj.jdbc.Driver hikari: - maximum-pool-size: 300 + maximum-pool-size: 50 jpa: database: mysql