📜  使用 hystrix 实现容错 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:38.628000             🧑  作者: Mango

代码示例1
@GetMapping("/fault-tolerance-example")
    @HystrixCommand(fallbackMethod="fallbackRetrieveConfguration")
    public LimitConfiguration retrieveConfiguration() {
        throw new RuntimeException("Not Available");
    }

    public LimitConfiguration fallbackRetrieveConfiguration() {
        return new LimitConfiguration(999, 9);
    }