Jboot 是一个基于 JFinal、JFinal-Undertow、Dubbo 等开发的微服务框架,帮助开发者降低微服务开发门槛。Jboot v2.0-rc.8 主要是优化细节,并新增限流模块。 以下是限流的使用使用方案1:通过配置来实现 在 jboot.limit.enable = true jboot.limit.rule = /user*:tb:1,io.jboot.aop*.get*(*):tb:1
在以上配置中,配置了2个规则,分别是:
第一个规则:匹配 第二个规则:匹配 使用方案2:通过注解 例如: @RequestMapping("/") public class IndexController extends JbootController { @EnableLimit(rate = 1,fallback = "fallbackMethod") public void index() { renderText("index...." ); } public void fallbackMethod(){ renderText("fallback..."); } } 通过使用
Jboot v2.0-rc.8 更新内容如下:
更多Jboot的功能,请移步:https://gitee.com/fuhai/jboot/ |