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

com.ideaaedi.commonspring.lite.annotation.AntiDuplication Maven / Gradle / Ivy

There is a newer version: 2100.10.10.LTS17
Show newest version
package com.ideaaedi.commonspring.lite.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;

/**
 * 防重复
 * 

*

 * 子注解写法示例(子注解中可部分或全部重写@AntiDuplication中的属性):
 * | @AntiDuplication
 * | @Target(value = ElementType.METHOD)
 * | @Retention(value = RetentionPolicy.RUNTIME)
 * | public @interface MyAntiDuplication {
 * |     @AliasFor(annotation = AntiDuplication.class)
 * |     String spel() default "";
 * |
 * |     @AliasFor(annotation = AntiDuplication.class)
 * |     long during() default 1L;
 * |
 * |     @AliasFor(annotation = AntiDuplication.class)
 * |     TimeUnit unit() default TimeUnit.SECONDS;
 * | }
 * 
* * @author JustryDeng * @since 2100.7.3 */ @Retention(value = RetentionPolicy.RUNTIME) @Target(value = {ElementType.METHOD, ElementType.TYPE}) public @interface AntiDuplication { /** * 防重的相关spel (支持spel) *

* spel示例:"#{#user.id + ':' + #user.username}" *

* 更多spel示例可参考{@link com.ideaaedi.commonspring.parser.SpelUtil}中的注释说明 */ String spel() default ""; /** * 时长 */ long during() default 3L; /** * 时长单位 */ TimeUnit unit() default TimeUnit.SECONDS; /** * 提示信息 */ String message() default ""; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy