anchor.diff:  ----
   
   For some usages of the gateway, properties will be adequate, but some production use cases will benefit from loading configuration from an external source, such as a database. Future milestone versions will have `RouteDefinitionLocator` implementations based off of Spring Data Repositories such as: Redis, MongoDB and Cassandra.
  +
  +=== Fluent Java Routes API
  +To allow for simple configuration in Java, there is a fluent API defined in the `Routes` class.
  +
  +.Config.java
  +[source,java]
  +----
  +// static imports from WebFilterFactories and RoutePredicates
  +@Bean
  +public RouteLocator customRouteLocator(ThrottleWebFilterFactory throttle) {
  +    return Routes.locator()
  +            .route("test")
  +                .uri("http://httpbin.org:80")
  +                .predicate(host("**.abc.org").and(path("/image/png")))
  +                .addResponseHeader("X-TestHeader", "foobar")
  +                .and()
  +            .route("test2")
  +                .uri("http://httpbin.org:80")
  +                .predicate(path("/image/webp"))
  +                .add(addResponseHeader("X-AnotherHeader", "baz"))
  +                .and()
  +            .build();
  +}
  +----
  +
  +This style also allows for more custom predicate assertions. The predicates defined by `RouteDefinitionLocator` beans are combined using logical `and`. By using the fluent Java API, you can use the `and()`, `or()` and `negate()` operators on the `Predicate` class.
   
   == Actuator API
   
  
positive.code: This will add `X-Response-Foo:Bar` header to the downstream response's headers for all matching requests.
  
  === Hystrix WebFilter Factory
  TODO: document Hystrix WebFilter Factory
  
  === PrefixPath WebFilter Factory
  The PrefixPath WebFilter Factory takes a single `prefix` parameter.
  
negative.code: ----
  
  This will prefix `/mypath` to the path of all matching requests. So a request to `/hello`, would be sent to `/mypath/hello`.
  
  === RequestRateLimiter WebFilter Factory
  
  The RequestRateLimiter WebFilter 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
  [source,java]
  ----
  public interface KeyResolver {
  	Mono<String> resolve(ServerWebExchange exchange);
  }
  ----
  
  The `KeyResolver` interface allows pluggable strategies to derive the key for limiting requests. In future milestones, there will be some `KeyResolver` implementations.
  
  The redis implementation is based off of work done at https://stripe.com/blog/rate-limiters[Stripe]. It requires the use of the `spring-boot-starter-data-redis-reactive` Spring Boot starter.
  
  
  .application.yml
  [source,yaml]
  ----
  spring:
    cloud:
      gateway:
        routes:
        # =====================================
        - id: requestratelimiter_route
          uri: http://example.org
          filters:
          - RequestRateLimiter=10, 20, userKeyResolver
  ----
  
  .Config.java
  [source,java]
  ----
  @Bean
  KeyResolver userKeyResolver() {
      return exchange -> Mono.just(exchange.getRequest().getQueryParams().getFirst("user"));
  }
  ----
  
  This defines a request rate limit of 10 per user. The `KeyResolver` is a simple one that gets the `user` request parameter (note: this is not recommended for production).
  
  === RedirectTo WebFilter Factory
  The RedirectTo WebFilter Factory takes a `status` and a `url` parameter. The status should be a 300 series redirect http code, such as 301. The url should be a valid url. This will be the value of the `Location` header.
  