com.taotao.boot.idempotent.other.PreventDuplicateSubmit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of taotao-boot-starter-idempotent Show documentation
Show all versions of taotao-boot-starter-idempotent Show documentation
taotao-boot-starter-idempotent
The newest version!
package com.taotao.boot.idempotent.other;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 请求信息日志
*
* @author : YiFei
* @since : 2023/10/2 17:31
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface PreventDuplicateSubmit {
DuplicateTypeEnum type() default DuplicateTypeEnum.IP;
/**
* 是否为全局
* 默认 : ip:classSimpleName:methodName
* 全局 : ip
*/
boolean global() default false;
/**
* 防重提交锁过期时间(秒)
*
* 默认1秒内不允许重复提交
*/
int expire() default 1;
}