Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2020-04-08 20:42:13 +00:00
parent e56cf6163e
commit cb816942a6
2 changed files with 12 additions and 20 deletions

View File

@@ -1092,11 +1092,10 @@ The accepted values are <code>RETAIN_FIRST</code> (default), <code>RETAIN_LAST</
<h3 id="spring-cloud-circuitbreaker-filter-factory"><a class="anchor" href="#spring-cloud-circuitbreaker-filter-factory"></a><a class="link" href="#spring-cloud-circuitbreaker-filter-factory">6.5. Spring Cloud CircuitBreaker GatewayFilter Factory</a></h3>
<div class="paragraph">
<p>The Spring Cloud CircuitBreaker GatewayFilter factory uses the Spring Cloud CircuitBreaker APIs to wrap Gateway routes in
a circuit breaker. Spring Cloud CircuitBreaker supports two libraries that can be used with Spring Cloud Gateway, Hystrix
and Resilience4J. Since Netflix has placed Hystrix in maintenance-only mode, we suggest that you use Resilience4J.</p>
a circuit breaker. Spring Cloud CircuitBreaker supports multiple libraries that can be used with Spring Cloud Gateway. Spring Cloud supports Resilience4J out of the box.</p>
</div>
<div class="paragraph">
<p>To enable the Spring Cloud CircuitBreaker filter, you need to place either <code>spring-cloud-starter-circuitbreaker-reactor-resilience4j</code> or <code>spring-cloud-starter-netflix-hystrix</code> on the classpath.
<p>To enable the Spring Cloud CircuitBreaker filter, you need to place <code>spring-cloud-starter-circuitbreaker-reactor-resilience4j</code> on the classpath.
The following example configures a Spring Cloud CircuitBreaker <code>GatewayFilter</code>:</p>
</div>
<div class="exampleblock">
@@ -1124,9 +1123,6 @@ The following example configures a Spring Cloud CircuitBreaker <code>GatewayFilt
<li>
<p><a href="https://cloud.spring.io/spring-cloud-circuitbreaker/reference/html/spring-cloud-circuitbreaker.html">Resilience4J Documentation</a></p>
</li>
<li>
<p><a href="https://cloud.spring.io/spring-cloud-netflix/reference/html/">Hystrix Documentation</a></p>
</li>
</ul>
</div>
<div class="paragraph">
@@ -1228,7 +1224,7 @@ You can find more information on doing so in the <a href="#fallback-headers">Fa
<div class="sect2">
<h3 id="fallback-headers"><a class="anchor" href="#fallback-headers"></a><a class="link" href="#fallback-headers">6.6. The <code>FallbackHeaders</code> <code>GatewayFilter</code> Factory</a></h3>
<div class="paragraph">
<p>The <code>FallbackHeaders</code> factory lets you add Hystrix or Spring Cloud CircuitBreaker execution exception details in the headers of a request forwarded to a <code>fallbackUri</code> in an external application, as in the following scenario:</p>
<p>The <code>FallbackHeaders</code> factory lets you add Spring Cloud CircuitBreaker execution exception details in the headers of a request forwarded to a <code>fallbackUri</code> in an external application, as in the following scenario:</p>
</div>
<div class="exampleblock">
<div class="title">Example 24. application.yml</div>
@@ -1284,7 +1280,7 @@ The headers with the exception type, message and (if available) root cause excep
</ul>
</div>
<div class="paragraph">
<p>For more information on circuit beakers and the gatewayc see the <a href="#hystrix">Hystrix GatewayFilter Factory section</a> or <a href="#spring-cloud-circuitbreaker-filter-factory">Spring Cloud CircuitBreaker Factory section</a>.</p>
<p>For more information on circuit breakers and the gateway see the <a href="#spring-cloud-circuitbreaker-filter-factory">Spring Cloud CircuitBreaker Factory section</a>.</p>
</div>
</div>
<div class="sect2">
@@ -2619,7 +2615,7 @@ The new URI is placed in the <code>ServerWebExchangeUtils.GATEWAY_REQUEST_URL_AT
<div class="sect2">
<h3 id="the-websocket-routing-filter"><a class="anchor" href="#the-websocket-routing-filter"></a><a class="link" href="#the-websocket-routing-filter">7.8. The Websocket Routing Filter</a></h3>
<div class="paragraph">
<p>If the URL located in the <code>ServerWebExchangeUtils.GATEWAY_REQUEST_URL_ATTR</code> exchange attribute has a <code>ws</code> or <code>wss</code> scheme, the websocket routing rilter runs. It uses the Spring WebSocket infrastructure to forward the websocket request downstream.</p>
<p>If the URL located in the <code>ServerWebExchangeUtils.GATEWAY_REQUEST_URL_ATTR</code> exchange attribute has a <code>ws</code> or <code>wss</code> scheme, the websocket routing filter runs. It uses the Spring WebSocket infrastructure to forward the websocket request downstream.</p>
</div>
<div class="paragraph">
<p>You can load-balance websockets by prefixing the URI with <code>lb</code>, such as <code>lb:ws://serviceid</code>.</p>
@@ -3170,7 +3166,7 @@ The following example shows what this looks like:</p>
spring.cloud.gateway.discovery.locator.predicates[0].args[pattern]: "'/'+serviceId+'/**'"
spring.cloud.gateway.discovery.locator.predicates[1].name: Host
spring.cloud.gateway.discovery.locator.predicates[1].args[pattern]: "'**.foo.com'"
spring.cloud.gateway.discovery.locator.filters[0].name: Hystrix
spring.cloud.gateway.discovery.locator.filters[0].name: CircuitBreaker
spring.cloud.gateway.discovery.locator.filters[0].args[name]: serviceId
spring.cloud.gateway.discovery.locator.filters[1].name: RewritePath
spring.cloud.gateway.discovery.locator.filters[1].args[regexp]: "'/' + serviceId + '/(?&lt;remaining&gt;.*)'"