springcloudHystirx熔断注解

@HystrixCommand(fallbackMethod = "降级方法名",commandProperties = {

  @HystrixProperty(name = “circuitBreaker.enable",value = "true"),//开启断路器

  @HystrixProperty(name = “circuitBreaker.sleepWindowMilliseconds",value = "10000"),//时间范围(毫秒)

  @HystrixProperty(name = “circuitBreaker.requestVolumeThreshold",value = "10"),//请求次数峰值

  @HystrixProperty(name = “circuitBreaker.errorThresholdPercentage",value = "60"),//失败率达到多少触发

posted @ 2021-08-19 10:35  应景的BGM  阅读(105)  评论(0)    收藏  举报