From eb0a30c47ec67de4f2e56fef1ddc36730150a99c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A4=ED=9A=A8=EC=A4=80=20=F0=9F=98=8E?= <143938662+yoonc01@users.noreply.github.com> Date: Thu, 25 Jun 2026 08:17:08 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EC=A7=80=EC=9B=90=20=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=20=EB=8C=80=ED=95=99=20=EA=B2=80=EC=83=89=20=EC=BA=90?= =?UTF-8?q?=EC=8B=9C=20=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94=20(#792)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../university/service/UnivApplyInfoQueryService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/solidconnection/university/service/UnivApplyInfoQueryService.java b/src/main/java/com/example/solidconnection/university/service/UnivApplyInfoQueryService.java index 72bbeab00..3ee7ecc4e 100644 --- a/src/main/java/com/example/solidconnection/university/service/UnivApplyInfoQueryService.java +++ b/src/main/java/com/example/solidconnection/university/service/UnivApplyInfoQueryService.java @@ -43,7 +43,7 @@ public UnivApplyInfoDetailResponse getUnivApplyInfoDetail(Long univApplyInfoId) @Transactional(readOnly = true) // todo: 현재 레디스 관련 에러 발생중으로 임시 주석처리, 추후 원인 분석 후 적용 필요 - @ThunderingHerdCaching(key = "univApplyInfoTextSearch:{0}:{1}:{2}", cacheManager = "customCacheManager", ttlSec = 86400) + //@ThunderingHerdCaching(key = "univApplyInfoTextSearch:{0}:{1}:{2}", cacheManager = "customCacheManager", ttlSec = 86400) public UnivApplyInfoPreviewResponses searchUnivApplyInfoByText( String text, Long homeUniversityId, From d7d866e94070f0603578ad7bc4674d0a825f87bd Mon Sep 17 00:00:00 2001 From: seonghyeok cho <65901319+whqtker@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:24:45 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20CustomException=EC=9D=80=20?= =?UTF-8?q?=EC=9D=B4=EC=A4=91=20=EB=9E=98=ED=95=91=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EA=B3=A0=20=EB=8D=98=EC=A7=80=EB=8F=84=EB=A1=9D=20(#7?= =?UTF-8?q?91)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: CustomException은 이중 래핑하지 않고 던지도록 * test: 존재하지 않는 대학을 조회하는 경우 CustomException을 기대하도록 --- .../solidconnection/cache/ThunderingHerdCachingAspect.java | 5 +++++ .../university/service/UnivApplyInfoQueryServiceTest.java | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/example/solidconnection/cache/ThunderingHerdCachingAspect.java b/src/main/java/com/example/solidconnection/cache/ThunderingHerdCachingAspect.java index 6f0abc7f2..22652b1c1 100644 --- a/src/main/java/com/example/solidconnection/cache/ThunderingHerdCachingAspect.java +++ b/src/main/java/com/example/solidconnection/cache/ThunderingHerdCachingAspect.java @@ -7,6 +7,7 @@ import com.example.solidconnection.cache.annotation.ThunderingHerdCaching; import com.example.solidconnection.cache.manager.CacheManager; +import com.example.solidconnection.common.exception.CustomException; import com.example.solidconnection.util.RedisUtils; import java.time.Duration; import java.util.UUID; @@ -114,6 +115,8 @@ private Object executeWithLock(String lockKey, Callable onLockAcquired, } else { return onLockFailed.call(); } + } catch (CustomException e) { + throw e; } catch (Exception e) { throw new RuntimeException("Error during executeWithLock", e); } finally { @@ -150,6 +153,8 @@ private Object waitForCacheToUpdate(ProceedingJoinPoint joinPoint, String key) { private Object proceedJoinPoint(ProceedingJoinPoint joinPoint) { try { return joinPoint.proceed(); + } catch (CustomException e) { + throw e; } catch (Throwable e) { throw new RuntimeException("Error during proceedJoinPoint", e); } diff --git a/src/test/java/com/example/solidconnection/university/service/UnivApplyInfoQueryServiceTest.java b/src/test/java/com/example/solidconnection/university/service/UnivApplyInfoQueryServiceTest.java index f39762ba8..c914aab65 100644 --- a/src/test/java/com/example/solidconnection/university/service/UnivApplyInfoQueryServiceTest.java +++ b/src/test/java/com/example/solidconnection/university/service/UnivApplyInfoQueryServiceTest.java @@ -83,10 +83,8 @@ class 대학_지원_정보_상세_조회 { Long invalidUnivApplyInfoId = 9999L; // when & then - assertThatExceptionOfType(RuntimeException.class) + assertThatExceptionOfType(CustomException.class) .isThrownBy(() -> univApplyInfoQueryService.getUnivApplyInfoDetail(invalidUnivApplyInfoId)) - .havingRootCause() - .isInstanceOf(CustomException.class) .withMessage(UNIV_APPLY_INFO_NOT_FOUND.getMessage()); } }