疯狂的狮子li
2021-06-04 f087b37cb32b84ae841fc409ea00ed2f729d9c8e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.ruoyi.common.annotation;
 
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
 
/**
 * 分布式锁(注解模式,不推荐使用,最好用锁的工具类)
 *
 * @author shenxinquan
 */
 
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface RedisLock {
 
    /**
     * 锁过期时间 默认30秒
     */
    int expireTime() default 30;
 
    /**
     * 锁key值
     */
    String key() default "redisLockKey";
}