diff --git a/2.0.x/multi/multi_gateway-route-filters.html b/2.0.x/multi/multi_gateway-route-filters.html index 78ae6e4c..62146d0b 100644 --- a/2.0.x/multi/multi_gateway-route-filters.html +++ b/2.0.x/multi/multi_gateway-route-filters.html @@ -50,7 +50,7 @@ uri: http://example.org filters: - PrefixPath=/mypath

-

This will prefix /mypath to the path of all matching requests. So a request to /hello, would be sent to /mypath/hello.

5.6 RequestRateLimiter GatewayFilter Factory

The RequestRateLimiter GatewayFilter Factory takes three parameters: replenishRate, burstCapacity & keyResolverName.

replenishRate is how many requests per second do you want a user to be allowed to do.

burstCapacity TODO: document burst capacity

keyResolverName is the name of a bean that implements the KeyResolver interface.

KeyResolver.java.  +

This will prefix /mypath to the path of all matching requests. So a request to /hello, would be sent to /mypath/hello.

5.6 RequestRateLimiter GatewayFilter Factory

The RequestRateLimiter GatewayFilter Factory takes three parameters: replenishRate, burstCapacity & keyResolverName.

replenishRate is how many requests per second do you want a user to be allowed to do.

burstCapacity TODO: document burst capacity

keyResolver is a bean that implements the KeyResolver interface. In configuration, reference the bean by name using SpEL. #{@myKeyResolver} is a SpEL expression referencing a bean with the name myKeyResolver.

KeyResolver.java. 

public interface KeyResolver {
 	Mono<String> resolve(ServerWebExchange exchange);
 }

@@ -63,7 +63,7 @@ - id: requestratelimiter_route uri: http://example.org filters: - - RequestRateLimiter=10, 20, userKeyResolver

+ - RequestRateLimiter=10, 20, #{@userKeyResolver}

Config.java. 

@Bean
 KeyResolver userKeyResolver() {
diff --git a/2.0.x/single/spring-cloud-gateway.html b/2.0.x/single/spring-cloud-gateway.html
index e29adfec..9d6f45b3 100644
--- a/2.0.x/single/spring-cloud-gateway.html
+++ b/2.0.x/single/spring-cloud-gateway.html
@@ -162,7 +162,7 @@ for details on setting up your build system with the current Spring Cloud Releas
         uri: http://example.org
         filters:
         - PrefixPath=/mypath

-

This will prefix /mypath to the path of all matching requests. So a request to /hello, would be sent to /mypath/hello.

5.6 RequestRateLimiter GatewayFilter Factory

The RequestRateLimiter GatewayFilter Factory takes three parameters: replenishRate, burstCapacity & keyResolverName.

replenishRate is how many requests per second do you want a user to be allowed to do.

burstCapacity TODO: document burst capacity

keyResolverName is the name of a bean that implements the KeyResolver interface.

KeyResolver.java.  +

This will prefix /mypath to the path of all matching requests. So a request to /hello, would be sent to /mypath/hello.

5.6 RequestRateLimiter GatewayFilter Factory

The RequestRateLimiter GatewayFilter Factory takes three parameters: replenishRate, burstCapacity & keyResolverName.

replenishRate is how many requests per second do you want a user to be allowed to do.

burstCapacity TODO: document burst capacity

keyResolver is a bean that implements the KeyResolver interface. In configuration, reference the bean by name using SpEL. #{@myKeyResolver} is a SpEL expression referencing a bean with the name myKeyResolver.

KeyResolver.java. 

public interface KeyResolver {
 	Mono<String> resolve(ServerWebExchange exchange);
 }

@@ -175,7 +175,7 @@ for details on setting up your build system with the current Spring Cloud Releas - id: requestratelimiter_route uri: http://example.org filters: - - RequestRateLimiter=10, 20, userKeyResolver

+ - RequestRateLimiter=10, 20, #{@userKeyResolver}

Config.java. 

@Bean
 KeyResolver userKeyResolver() {
diff --git a/2.0.x/spring-cloud-gateway.xml b/2.0.x/spring-cloud-gateway.xml
index a94fad0e..f708467a 100644
--- a/2.0.x/spring-cloud-gateway.xml
+++ b/2.0.x/spring-cloud-gateway.xml
@@ -357,7 +357,7 @@ for details on setting up your build system with the current Spring Cloud Releas
 The RequestRateLimiter GatewayFilter Factory takes three parameters: replenishRate, burstCapacity & keyResolverName.
 replenishRate is how many requests per second do you want a user to be allowed to do.
 burstCapacity TODO: document burst capacity
-keyResolverName is the name of a bean that implements the KeyResolver interface.
+keyResolver is a bean that implements the KeyResolver interface. In configuration, reference the bean by name using SpEL. #{@myKeyResolver} is a SpEL expression referencing a bean with the name myKeyResolver.
 
 KeyResolver.java
 
@@ -379,7 +379,7 @@ for details on setting up your build system with the current Spring Cloud Releas
       - id: requestratelimiter_route
         uri: http://example.org
         filters:
-        - RequestRateLimiter=10, 20, userKeyResolver
+        - RequestRateLimiter=10, 20, #{@userKeyResolver}