All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.suchtool.nicelock.annotation.NiceLock Maven / Gradle / Ivy

There is a newer version: 1.1.6
Show newest version
package com.suchtool.nicelock.annotation;
 
import com.suchtool.nicelock.exception.LockFailException;

import java.lang.annotation.*;
 
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface NiceLock {
    /**
     * 锁的key。(支持SpEL)
     * 

如果参数是对象,这样写:#对象名.字段名,例如:#user.userName

*

如果参数不是对象,这样写:#字段名。例如:#orderNo

*/ String[] keys(); /** * 获取锁的超时时间。单位:毫秒 */ long acquireTimeout() default 0L; /** * 错误提示。若定义了exception,则作为其message。 */ String message() default "正在处理,请稍候重试"; /** * 报错时抛出的异常 */ Class exception() default LockFailException.class; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy