1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

update examples

This commit is contained in:
fangjian0423
2020-01-30 02:17:36 +08:00
parent 97528396fd
commit 57e3059d8d
23 changed files with 294 additions and 11 deletions

View File

@@ -60,14 +60,14 @@ public class TestController {
@GetMapping("/slow")
public String slow() {
return circuitBreakerFactory.create("show").run(() -> {
return circuitBreakerFactory.create("slow").run(() -> {
try {
Thread.sleep(1000L);
Thread.sleep(500L);
}
catch (InterruptedException e) {
e.printStackTrace();
}
return "success";
return "slow";
}, throwable -> "fallback");
}