update 优化 redis锁pr 代码

This commit is contained in:
疯狂的狮子li
2021-06-04 16:09:43 +08:00
parent ad6386a618
commit dcf125a08a
5 changed files with 105 additions and 135 deletions

View File

@ -7,6 +7,8 @@ import java.lang.annotation.Target;
/**
* 分布式锁(注解模式,不推荐使用,最好用锁的工具类)
*
* @author shenxinquan
*/
@Target({ElementType.METHOD})
@ -14,14 +16,12 @@ import java.lang.annotation.Target;
public @interface RedisLock {
/**
* 锁过期时间
* @return
* 锁过期时间 默认30秒
*/
int expireTime() default 30;//30秒
int expireTime() default 30;
/**
* 锁key值
* @return
*/
String key() default "redisLockKey";
}