开始:
@SentinelResource(value = "testHotKey", blockHandler = "deal_testHotKey")
@GetMapping(value = "/testHotKey")
public CommonResult testHotKey(@RequestParam(value = "p1", required = false) String p1,
@RequestParam(value = "p2", required = false) String p2) {
return new CommonResult(400, "testHotKey() + " + p1 + p2);
}
//兜底方法
public CommonResult deal_testHotKey(@RequestParam(value = "p1", required = false) String p1,
@RequestParam(value = "p2", required = false) String p2,
BlockException e) {
return new CommonResult(400, "deal_testHotKey() + " + p1 + p2);
}