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

com.gitee.fufu669.aspect.CheckVisitFrequency Maven / Gradle / Ivy

There is a newer version: 6.666.66021
Show newest version
package com.gitee.fufu669.aspect;

import com.gitee.fufu669.common.CacheKeyCommon;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author wangfupeng on 2017-5-5. 检查在某秒内访问不得超过某次, 格式是formula="秒钟,次数"
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface CheckVisitFrequency {

    /*在3秒钟内访问超过1次抛出异常设置成"3,1"
    在60秒钟内访问超过5次抛出异常设置成"60,5"*/
    String formula() default CacheKeyCommon.CHECKVISITFREQUENCY_LIMIT_VISIT_FORMULA;

    /*在打印日志时会出现的提示*/
    String description() default "";

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy