title: Spring Cloud Gateway doesn't work with DiscoveryClientRouteDefinitionLocator
body: <p>I was working with Spring cloud gateway when i use routes statique like this (It works fine) :</p>
  <pre><code>@Bean
  RouteLocator routeLocator(RouteLocatorBuilder builder) {
      return builder.routes()
              .route((r) -&gt; r.path(&quot;/customers/**&quot;).uri(&quot;http://localhost:8081/&quot;))
              .route((r) -&gt; r.path(&quot;/products/**&quot;).uri(&quot;http://localhost:8082/&quot;))
              .build();
  }
  </code></pre>
  <p>But when i want to use routes dynamique with DiscoveryClientRouteDefinitionLocator doesn't wotk
  Here is my function :</p>
  <pre><code>@Bean
  DiscoveryClientRouteDefinitionLocator definitionLocator(
          ReactiveDiscoveryClient rdc,
          DiscoveryLocatorProperties properties) {
      return new DiscoveryClientRouteDefinitionLocator(rdc, properties);
  }
  </code></pre>
  <p>And this is my application.properties :</p>
  <pre><code>server.port=8888
  spring.application.name=gateway-service
  spring.cloud.discovery.enabled=true
  </code></pre>
  <p>when i call this uri http://localhost:8888/PRODUCT-SERVICE/products i get :</p>
  <pre><code> Whitelabel Error Page
  This application has no configured error view, so you are seeing this as a fallback.
  
  Tue Dec 22 00:42:19 WEST 2020
  [97127699-3] There was an unexpected error (type=Internal Server Error, status=500).
  </code></pre>
  <p>The exception generated in the console :</p>
  <pre><code>    java.net.UnknownHostException: failed to resolve 'DESKTOP-B8APKA3.mshome.net' after 4 queries 
      at io.netty.resolver.dns.DnsResolveContext.finishResolve(DnsResolveContext.java:1013) ~[netty-resolver-dns-4.1.55.Final.jar:4.1.55.Final]
      Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
  Error has been observed at the following site(s):
      |_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
      |_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
      |_ checkpoint ⇢ HTTP GET &quot;/CUSTOMER-SERVICE/customers&quot; [ExceptionHandlingWebHandler]
      |_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
      |_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
      |_ checkpoint ⇢ HTTP GET &quot;/PRODUCT-SERVICE/products&quot; [ExceptionHandlingWebHandler]
  Stack trace:
          at io.netty.resolver.dns.DnsResolveContext.finishResolve(DnsResolveContext.java:1013) ~[netty-resolver-dns-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.resolver.dns.DnsResolveContext.tryToFinishResolve(DnsResolveContext.java:966) ~[netty-resolver-dns-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.resolver.dns.DnsResolveContext.query(DnsResolveContext.java:414) ~[netty-resolver-dns-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.resolver.dns.DnsResolveContext.onResponse(DnsResolveContext.java:625) ~[netty-resolver-dns-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.resolver.dns.DnsResolveContext.access$400(DnsResolveContext.java:63) ~[netty-resolver-dns-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.resolver.dns.DnsResolveContext$2.operationComplete(DnsResolveContext.java:458) ~[netty-resolver-dns-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578) [netty-common-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571) [netty-common-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550) [netty-common-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491) [netty-common-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616) [netty-common-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605) [netty-common-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104) [netty-common-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.resolver.dns.DnsQueryContext.trySuccess(DnsQueryContext.java:201) ~[netty-resolver-dns-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.resolver.dns.DnsQueryContext.finish(DnsQueryContext.java:193) ~[netty-resolver-dns-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.resolver.dns.DnsNameResolver$DnsResponseHandler.channelRead(DnsNameResolver.java:1230) ~[netty-resolver-dns-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:93) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[netty-transport-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.55.Final.jar:4.1.55.Final]
          at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.55.Final.jar:4.1.55.Final]
          at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_251]
  </code></pre>