title: Spring cloud gateway hystrix not working
body: <p>I am having issues getting hystrix to work with my route.  things like re-write paths and load balancing are working but for some reason hystrix never trips.  I am setting my timeouts very low and have a delay in a downstream service.  Is there anything special you need to do to get hystrix working?</p>
  
  <p>I am using spring-cloud-gateway with eureka and spring-cloud-config.  Also, is there a way to debug when a route is not working?  Like a log setting to see what is happening?</p>
  
  <p>Here is my route:</p>
  
  <pre><code>spring:
    cloud:
      gateway:
        routes:
        # =====================================
        - id: main-service
          uri: lbl://main-service
          predicates:
          - Path=/main-service**
          filters:
          - Hystrix=mainservice
  </code></pre>
  
  <p>Here is my pom</p>
  
  <pre><code>&lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;2.0.0.M7&lt;/version&gt;
      &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
  &lt;/parent&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.reporting.outputEncoding&gt;UTF-
          8&lt;/project.reporting.outputEncoding&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;spring-cloud.version&gt;Finchley.M5&lt;/spring-cloud.version&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-gateway&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-config&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-eureka&lt;/artifactId&gt;
          &lt;version&gt;1.4.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-hystrix&lt;/artifactId&gt;
          &lt;version&gt;2.0.0.M2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-dependencies&lt;/artifactId&gt;
              &lt;version&gt;${spring-cloud.version}&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;import&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  </code></pre>
  
  <p>Here is my Application class:</p>
  
  <pre><code>@EnableDiscoveryClient
  @EnableHystrix
  @SpringBootApplication
  public class GatewayApplication {
  
      public static void main(String[] args) {
      SpringApplication.run(GatewayApplication.class, args);
      }
    }
  </code></pre>
  
  <p>The only other class in the jar is this:</p>
  
  <pre><code>@Configuration
  public class GatewayConfiguration {
  
  @Bean
  public DiscoveryClientRouteDefinitionLocator 
        discoveryClientRouteLocator(DiscoveryClient discoveryClient) {
  
      return new DiscoveryClientRouteDefinitionLocator(discoveryClient);
      }
  
  }
  </code></pre>