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

@ -52,7 +52,7 @@ public class RedisLockController {
if (flag) {
log.info("获取锁成功: " + key);
Thread.sleep(3000);
redisLockManager.unLock();
redisLockManager.unLock(key);
log.info("释放锁成功: " + key);
} else {
log.error("获取锁失败: " + key);