26 lines
630 B
Java
Raw Normal View History

2023-02-16 15:28:15 +08:00
package com.zhgd.redis.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;
/**
* @program: wisdomSite
* @description: 自定义注解分布式锁
* @author: Mr.Peng
* @create: 2021-07-26 17:08
**/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ApiIdempotent {
/** 过期秒数,默认为5秒 */
int expire() default 5;
/** 超时时间单位,默认为秒 */
TimeUnit timeUnit() default TimeUnit.SECONDS;
}