NoRepeatSubmit.java 439 B

123456789101112131415161718192021222324
  1. package com.kmall.admin.annotation;
  2. import org.springframework.stereotype.Component;
  3. import java.lang.annotation.*;
  4. /**
  5. * 自定义防重复提交注解
  6. * @author hj
  7. * @createDate 2021-04-29
  8. */
  9. @Inherited
  10. @Target({ElementType.METHOD})
  11. @Retention(RetentionPolicy.RUNTIME)
  12. @Documented
  13. @Component
  14. public @interface NoRepeatSubmit {
  15. /**
  16. * 默认时间 默认5秒钟
  17. * @return
  18. */
  19. int lockTime() default 5000;
  20. }