refactor: 删除限流和防重提交注解功能

- 移除CoderLimit限流注解
- 移除CoderRepeatSubmit防重提交注解
- 清理相关的安全控制组件
This commit is contained in:
Leo 2025-10-17 11:07:19 +08:00
parent 9748a3f30c
commit cc94ec159a
2 changed files with 0 additions and 79 deletions

View File

@ -1,46 +0,0 @@
package org.leocoder.heritage.common.anno;
import org.leocoder.heritage.common.constants.CoderCacheConstants;
import org.leocoder.heritage.common.enmus.limit.LimitType;
import java.lang.annotation.*;
/**
* @author : Leocoder
* @description [CoderLimit限流注解]
* 定义了两种限流类型分别为全局限流和 IP 限流
* 1全局限流对访问接口的所有用户进行限流保护
* 2IP限流对每个IP请求用户进行单独限流保护
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CoderLimit {
/**
* 限流key前缀
*/
String prefix() default CoderCacheConstants.RATE_LIMIT_KEY;
/**
* 限流时间,单位秒
*/
int time() default 3;
/**
* 限流次数
*/
int count() default 18;
/**
* 提示信息
*/
String message() default "访问过于频繁,请稍候再试";
/**
* 限流类型(默认IP限流)
*/
LimitType type() default LimitType.IP;
}

View File

@ -1,33 +0,0 @@
package org.leocoder.heritage.common.anno;
import org.leocoder.heritage.common.constants.CoderCacheConstants;
import java.lang.annotation.*;
/**
* @author : Leocoder
* @description [CoderRepeatSubmit]
*/
@Inherited
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CoderRepeatSubmit {
/**
* 限流key前缀
*/
String prefix() default CoderCacheConstants.REPEAT_SUBMIT_KEY;
/**
* 单位为秒600毫秒内防止重复提交1秒等于1000毫秒
*/
int value() default 600;
/**
* 提示信息
*/
String message() default "请勿重复提交,请稍后重试";
}