update 优化redis锁工具代码结构

This commit is contained in:
疯狂的狮子li
2021-06-10 13:32:50 +08:00
parent 524683eabd
commit 1bf9dd1217
3 changed files with 79 additions and 35 deletions

View File

@ -10,7 +10,6 @@ import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.redisson.api.RLock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@ -78,7 +77,7 @@ public class RedisLockAspect {
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
redisLockManager.unLock();
redisLockManager.unLock(key);
log.info("unlock => key : " + key + " , ThreadName : " + Thread.currentThread().getName());
}
} else {