From f10c69f19ff6a05095c32103777c65a4c2872bdd Mon Sep 17 00:00:00 2001 From: "Yangkai.Shen" <237497819@qq.com> Date: Fri, 20 Sep 2019 09:04:16 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20spring-boot-demo-ratelimit-guava?= =?UTF-8?q?=20=E5=AE=8C=E6=88=90=EF=BC=8C=E6=B5=8B=E8=AF=95=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E6=96=B9=E6=B3=95=E9=99=90=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xkcoding/ratelimit/guava/controller/TestController.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spring-boot-demo-ratelimit-guava/src/main/java/com/xkcoding/ratelimit/guava/controller/TestController.java b/spring-boot-demo-ratelimit-guava/src/main/java/com/xkcoding/ratelimit/guava/controller/TestController.java index 16b720b..66c3eb6 100644 --- a/spring-boot-demo-ratelimit-guava/src/main/java/com/xkcoding/ratelimit/guava/controller/TestController.java +++ b/spring-boot-demo-ratelimit-guava/src/main/java/com/xkcoding/ratelimit/guava/controller/TestController.java @@ -30,4 +30,11 @@ public class TestController { log.info("【test2】被执行了。。。。。"); return Dict.create().set("msg", "hello,world!").set("description", "我一直都在,卟离卟弃"); } + + @RateLimiter(value = 2.0, timeout = 300) + @GetMapping("/test3") + public Dict test3() { + log.info("【test3】被执行了。。。。。"); + return Dict.create().set("msg", "hello,world!").set("description", "别想一直看到我,不信你快速刷新看看~"); + } }