This commit is contained in:
2025-12-30 11:02:57 +08:00
commit 5990a4f052
128 changed files with 3830 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package cn.wujiangbo.controller;
import cn.wujiangbo.annotation.RateLimit;
import cn.wujiangbo.result.JSONResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>测试类</p>
*
*/
@RestController
@RequestMapping("/test")
public class TestController {
//cycle秒内只能访问count次
@RateLimit(key= "testLimit:", count = 2, cycle = 2, msg = "同志,不要请求这么快,好吗")
@GetMapping("/test001")
public JSONResult test001() {
System.out.println("成功发送一条短信");
return JSONResult.success("成功发送一条短信");
}
}