SpringBoot 集成hystrix,熔断未开启为啥还调用熔断方法???

如题:根据HystrixDashboard查看熔断状态为Closed,
图片说明

按理说应该不会调用熔断方法,但看返回结果并非如此。

下面来看看我是怎么做的

开发环境:springboot-2.1.7.release

导入如下依赖:

 <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
            <version>2.0.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
            <version>2.0.0.RELEASE</version>
        </dependency>

添加hystrix配置类

图片说明

测试代码

图片说明

ExceptionHystrix中编写了一个API /exception/{i},(根据i的值决定方法走向)
在此方法上添加了hystrix配置,
我的预想是在满足配置的情况下才会调用熔断方法OnError(),否则抛出异常

i是2的倍数,throw Exception,否则调用熔断方法

开始测试

浏览器输入localhost:8888/hystrix/exceprion/1,测试i=1,必定会throw Exception,我的hystrix配置有一条是:

name = "circuitBreaker.requestVolumeThreshold", value = "3"

我理解至少执行三次才有可能触发熔断,以下是我调用一次接口:
图片说明

此时观察HystrixDashboard如下:
图片说明

也就是说还没达到熔断条件,已经调用熔断方法了,大家知道是怎么回事吗?

https://www.csdn.net/gather_2f/MtjaIg2sNjY2MTEtYmxvZwO0O0OO0O0O.html