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