RepeatSubmit.java 714 B

12345678910111213141516171819202122232425262728293031
  1. package com.schoolinout.common.annotation;
  2. import java.lang.annotation.Documented;
  3. import java.lang.annotation.ElementType;
  4. import java.lang.annotation.Inherited;
  5. import java.lang.annotation.Retention;
  6. import java.lang.annotation.RetentionPolicy;
  7. import java.lang.annotation.Target;
  8. /**
  9. * 自定义注解防止表单重复提交
  10. *
  11. * @author ruoyi
  12. *
  13. */
  14. @Inherited
  15. @Target(ElementType.METHOD)
  16. @Retention(RetentionPolicy.RUNTIME)
  17. @Documented
  18. public @interface RepeatSubmit
  19. {
  20. /**
  21. * 间隔时间(ms),小于此时间视为重复提交
  22. */
  23. public int interval() default 5000;
  24. /**
  25. * 提示消息
  26. */
  27. public String message() default "不允许重复提交,请稍候再试";
  28. }