diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/common/redisson/RedissonDistributedLockAop.java b/src/main/java/kr/co/studyhubinu/studyhubserver/common/redisson/RedissonDistributedLockAop.java index afffc25..d7dd5a0 100644 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/common/redisson/RedissonDistributedLockAop.java +++ b/src/main/java/kr/co/studyhubinu/studyhubserver/common/redisson/RedissonDistributedLockAop.java @@ -1,6 +1,6 @@ package kr.co.studyhubinu.studyhubserver.common.redisson; -import kr.co.studyhubinu.studyhubserver.exception.apply.StudyApplyLockAcquisitionException; +import kr.co.studyhubinu.studyhubserver.exception.apply.LockAcquisitionException; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.ProceedingJoinPoint; @@ -40,12 +40,12 @@ public Object around(ProceedingJoinPoint joinPoint) throws Throwable { available = lock.tryLock(LOCK_WAIT_TIME, LOCK_LEASE_TIME, TimeUnit.SECONDS); if (!available) { log.warn("Redisson GetLock Timeout {}", field); - throw new StudyApplyLockAcquisitionException(); + throw new LockAcquisitionException(); } result = joinPoint.proceed(); } catch (InterruptedException e) { - throw new StudyApplyLockAcquisitionException(); + throw new LockAcquisitionException(); } finally { if (available) { lock.unlock(); diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/exception/apply/StudyApplyLockAcquisitionException.java b/src/main/java/kr/co/studyhubinu/studyhubserver/exception/apply/LockAcquisitionException.java similarity index 82% rename from src/main/java/kr/co/studyhubinu/studyhubserver/exception/apply/StudyApplyLockAcquisitionException.java rename to src/main/java/kr/co/studyhubinu/studyhubserver/exception/apply/LockAcquisitionException.java index d53020e..010cd6c 100644 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/exception/apply/StudyApplyLockAcquisitionException.java +++ b/src/main/java/kr/co/studyhubinu/studyhubserver/exception/apply/LockAcquisitionException.java @@ -3,12 +3,12 @@ import kr.co.studyhubinu.studyhubserver.exception.StatusType; import kr.co.studyhubinu.studyhubserver.exception.common.CustomException; -public class StudyApplyLockAcquisitionException extends CustomException { +public class LockAcquisitionException extends CustomException { private final StatusType status; private static final String message = "스터디 지원에 대한 락 획득에 실패했습니다."; - public StudyApplyLockAcquisitionException() { + public LockAcquisitionException() { super(message); this.status = StatusType.STUDY_APPLY_LOCK_ACQUISITION; }