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:
@@ -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");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user