You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
548 B
28 lines
548 B
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";
|
|
}
|