小编Swa*_*oni的帖子

无法找到名为 CircuitBreaker 的 GatewayFilterFactory

属性文件

server:
  port: 8999
  
eureka:
  instance:
    hostname: localhost

    
#Actuator Configuration
management:
  endpoints:
    web:
      exposure:
        include: hystrix.stream, health, info  
        
#Hystrix Configuration
hystrix:
  command:
    fallbackcmd:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 4000


spring:
  application:
    name: gateway
  cloud:
    gateway:
      routes:
      - id: capability-deck
        uri: lb://capability-deck
        predicates:
        - Path=/capability/**
        filters:
            - name: CircuitBreaker
              args:
                name: capability-deck
                fallbackuri: forward:/capabilityServiceFallBack
        
     
      - id: home-page
        uri: lb://home-page
        predicates:
        - Path=/home/**
      
        
      - id: subscription
        uri: lb://subscription
        predicates:
        - Path=/subscription/**
       
       
        

Run Code Online (Sandbox Code Playgroud)

控制器

package com.valuepedia.gateway.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FallBackController { …
Run Code Online (Sandbox Code Playgroud)

java hystrix microservices

8
推荐指数
2
解决办法
2万
查看次数

标签 统计

hystrix ×1

java ×1

microservices ×1