Browse Source

polish

pull/41/head
Spencer Gibb 8 years ago
parent
commit
3a5de768e5
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 7
      src/test/java/org/springframework/cloud/gateway/test/GatewayTestApplication.java

7
src/test/java/org/springframework/cloud/gateway/test/GatewayTestApplication.java

@ -5,12 +5,12 @@ import org.springframework.boot.SpringBootConfiguration; @@ -5,12 +5,12 @@ import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.gateway.support.CachingRouteLocator;
import org.springframework.cloud.gateway.support.CompositeRouteLocator;
import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.cloud.gateway.config.GatewayProperties;
import org.springframework.cloud.gateway.config.PropertiesRouteLocator;
import org.springframework.cloud.gateway.discovery.DiscoveryClientRouteLocator;
import org.springframework.cloud.gateway.support.CachingRouteLocator;
import org.springframework.cloud.gateway.support.CompositeRouteLocator;
import org.springframework.cloud.gateway.support.InMemoryRouteRepository;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -49,8 +49,7 @@ public class GatewayTestApplication { @@ -49,8 +49,7 @@ public class GatewayTestApplication {
DiscoveryClientRouteLocator discoveryClientRouteLocator,
PropertiesRouteLocator propertiesRouteLocator) {
Flux<RouteLocator> flux = Flux.just(inMemoryRouteRepository, discoveryClientRouteLocator, propertiesRouteLocator);
CompositeRouteLocator composite = new CompositeRouteLocator(flux);
return new CachingRouteLocator(composite);
return new CachingRouteLocator(new CompositeRouteLocator(flux));
}
}

Loading…
Cancel
Save