com.lx.boot.lock.Lock Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lxboot3 Show documentation
Show all versions of lxboot3 Show documentation
使用文档: https://a7fi97h1rc.feishu.cn/docx/X3LRdtLhkoXQ8hxgXDQc2CLOnEg?from=from_copylink
package com.lx.boot.lock;
import com.lx.annotation.Note;
import java.lang.annotation.*;
/**
* @author ylx
* @version v1
* @summary 方法分布式锁
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Lock{
@Note("redis锁的key 默认为类名+方法名, 支持spel表达式, 例如: " +
"对象形式: #{#dto.orderNo}" +
"Map #{#map['key']}")
String key() default "";
@Note("锁持续时间 单位秒 默认1分钟")
int lockTime() default 60;
@Note("请求锁的超时时间(单位:毫秒)")
long timetOut() default 300L;
@Note("未获取到锁时的提示")
String errorMessage() default "操作过快,请稍后重试!";
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy