refactor: 统一实体/限流AOP化/精简日志/文件归位

This commit is contained in:
Ray.Hao
2026-06-24 08:11:23 +08:00
parent 0dce433849
commit 6b6c06370f
71 changed files with 751 additions and 914 deletions

View File

@@ -0,0 +1,22 @@
package com.youlai.boot.common.annotation;
import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;
/**
* 接口限流
* <p>标注在 Controller 方法上,基于 Redis 计数窗口实现</p>
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RateLimit {
int limit() default 0;
int window() default 0;
TimeUnit timeUnit() default TimeUnit.SECONDS;
String prefix() default "rate_limit:";
}