# RateLimiterToolStarter **Repository Path**: qylaile/rate-limiter-tool-starter ## Basic Information - **Project Name**: RateLimiterToolStarter - **Description**: 限流中间件 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-01-26 - **Last Updated**: 2024-09-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 使用说明 ## 引入依赖 ```xml com.zqy.ratelimiter ratelimiter-spring-boot-starter 1.0.0-SNAPSHOT ``` ## 添加注解 ```java @RestController public class HelloController { @DoRateLimiter(permitsPerSecond = 1, errorResult = "{\"code\": \"1001\",\"info\": \"调用方法超过最大次数,限流返回!\"}") @GetMapping("/hello") public Object hello() { return "hello"; } public void test(){} @RequestMapping(path = "/api/queryUserInfo", method = RequestMethod.GET) public UserInfo queryUserInfo(@RequestParam String userId) throws InterruptedException { return null; } } ```