From 3a5de768e5bec2af247f7155d0858777729e4ff6 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Fri, 17 Feb 2017 15:48:16 -0700 Subject: [PATCH] polish --- .../cloud/gateway/test/GatewayTestApplication.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/springframework/cloud/gateway/test/GatewayTestApplication.java b/src/test/java/org/springframework/cloud/gateway/test/GatewayTestApplication.java index d0a6b9b65..b5197b6fa 100644 --- a/src/test/java/org/springframework/cloud/gateway/test/GatewayTestApplication.java +++ b/src/test/java/org/springframework/cloud/gateway/test/GatewayTestApplication.java @@ -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 { DiscoveryClientRouteLocator discoveryClientRouteLocator, PropertiesRouteLocator propertiesRouteLocator) { Flux flux = Flux.just(inMemoryRouteRepository, discoveryClientRouteLocator, propertiesRouteLocator); - CompositeRouteLocator composite = new CompositeRouteLocator(flux); - return new CachingRouteLocator(composite); + return new CachingRouteLocator(new CompositeRouteLocator(flux)); } }