其他分享
首页 > 其他分享> > sentinel热点流控与持久化

sentinel热点流控与持久化

作者:互联网

 

@SentinelResource热点名称随意,这里为abc,监控也监控bac,上面配置的是才懂第一个参数开始,qps>1就熔断
    @GetMapping("/testHotKey")
    @SentinelResource(value ="abc",blockHandler = "deal_testHotKey")//热键名称唯一
    public String testHotKey(@RequestParam(value ="p1",required = false)String p1,
                             @RequestParam(value ="p2",required = false)String p2){
        return "----testHotKey";
    }
    public String deal_testHotKey(String p1, String p2,BlockException blockException){
        return "----deal_testHotKey,o(╥﹏╥)o";

    } 

 

标签:p2,p1,持久,String,deal,testHotKey,value,流控,sentinel
来源: https://www.cnblogs.com/wangbiaohistory/p/16123030.html