Функциональность повторной попытки Zuul не работает после добавления всех конфигураций в application.yml - PullRequest
0 голосов
/ 07 мая 2020

У меня есть сценарий с весенней загрузкой, zuul в качестве шлюза и Eureka как обнаружение службы. Мне нужно реализовать механизм повтора, прежде чем делать откат в шлюзе. Но код повтора не работает. Applcation.yml приведен ниже

    server:
      port: 8080

    eureka:
      client:
        serviceUrl:
          defaultZone: http://localhost:8083/eureka  

    spring:
      application:
        name: gateway-service

    zuul: 
      retryable: true
      prefix: /api
      routes:
        test-service: 
          sensitive-headers: Cookie,Set-Cookie 
          service-id: test-service
          path: /testservice/**
          strip-prefix: true
          retryable: true

    test-service:
      ribbon:
        MaxAutoRetries: 5
        retryableStatusCodes: 503
        OkToRetryOnAllOperations: true    

    authorization:
      token:
        name: Authorization
        prefix: Bearer
        secret: qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq

    hystrix:
      command:
        test-service:
          execution:
            isolation:
              strategy: THREAD
              thread:
                timeoutInMilliseconds: 60000000
            timeout:
              enable: false

    app:
      auth:
        allowPermissionPaths:
          - /
          - /error
          - /favicon.ico
          - /**/*.png
          - /**/*.gif
          - /**/*.svg
          - /**/*.jpg
          - /**/*.html
          - /**/*.css
          - /**/*.sass
          - /**/*.js 
          - /api/testservice/**

pom. xml добавление ниже

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.retry</groupId>
        <artifactId>spring-retry</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-netflix-ribbon -->
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-ribbon</artifactId> 
    </dependency> 
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-configuration-processor</artifactId>
        <optional>true</optional>
    </dependency> 

Я ожидаю помощи в реализации повтора с помощью zuul шлюз.

...