diff --git a/Api/src/main/java/allchive/server/api/block/service/DeleteBlockUseCase.java b/Api/src/main/java/allchive/server/api/block/service/DeleteBlockUseCase.java index a8d741ed..65a1579c 100644 --- a/Api/src/main/java/allchive/server/api/block/service/DeleteBlockUseCase.java +++ b/Api/src/main/java/allchive/server/api/block/service/DeleteBlockUseCase.java @@ -25,7 +25,7 @@ public class DeleteBlockUseCase { @Transactional @DistributedLock( lockType = DistributedLockType.BLOCK, - identifier = {"fromUserId, toUserId"}) + identifier = {"fromUserId", "toUserId"}) public BlockResponse execute(BlockRequest request, Long fromUserId, Long toUserId) { Long userId = SecurityUtil.getCurrentUserId(); validateExecution(userId, request); diff --git a/Domain/src/main/java/allchive/server/domain/common/aop/distributedLock/DistributedLockAop.java b/Domain/src/main/java/allchive/server/domain/common/aop/distributedLock/DistributedLockAop.java index fc521f28..1dd4fa29 100644 --- a/Domain/src/main/java/allchive/server/domain/common/aop/distributedLock/DistributedLockAop.java +++ b/Domain/src/main/java/allchive/server/domain/common/aop/distributedLock/DistributedLockAop.java @@ -47,7 +47,9 @@ private String getKey(ProceedingJoinPoint joinPoint, DistributedLock distributed private String createDynamicKey( String[] methodParameterNames, Object[] methodArgs, String[] identifiers) { List resultList = new ArrayList<>(); + Arrays.stream(methodParameterNames).forEach(a -> log.info(a)); for (String identifier : identifiers) { + log.info(identifier); int indexOfKey = Arrays.asList(methodParameterNames).indexOf(identifier); Object arg = methodArgs[indexOfKey]; if (arg == null) {