Browse Source

polish

pull/41/head
Spencer Gibb 8 years ago
parent
commit
69cb823bf2
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 4
      pom.xml
  2. 4
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/actuate/GatewayEndpoint.java
  3. 3
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/api/RouteLocator.java
  4. 3
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/api/RouteWriter.java
  5. 4
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/config/GatewayAutoConfiguration.java
  6. 2
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/config/PropertiesRouteLocator.java
  7. 2
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/discovery/DiscoveryClientRouteLocator.java
  8. 2
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/handler/RoutePredicateHandlerMapping.java
  9. 2
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/support/CachingRouteLocator.java
  10. 2
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/support/CompositeRouteLocator.java
  11. 4
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/support/InMemoryRouteRepository.java
  12. 5
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/BaseWebClientTests.java
  13. 2
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/GatewayTestApplication.java
  14. 2
      spring-cloud-gateway-sample/src/main/java/org/springframework/cloud/gateway/sample/GatewaySampleApplication.java
  15. 2
      spring-cloud-gateway-sample/src/test/java/org/springframework/cloud/gateway/sample/GatewaySampleApplicationTests.java

4
pom.xml

@ -48,7 +48,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<reactor.version>Aluminium-SR1</reactor.version> <reactor-bom.version>Aluminium-SR1</reactor-bom.version>
<spring-boot.version>2.0.0.BUILD-SNAPSHOT</spring-boot.version> <spring-boot.version>2.0.0.BUILD-SNAPSHOT</spring-boot.version>
<spring-cloud-commons.version>1.2.0.BUILD-SNAPSHOT</spring-cloud-commons.version> <spring-cloud-commons.version>1.2.0.BUILD-SNAPSHOT</spring-cloud-commons.version>
<spring-cloud-netflix.version>1.3.0.BUILD-SNAPSHOT</spring-cloud-netflix.version> <spring-cloud-netflix.version>1.3.0.BUILD-SNAPSHOT</spring-cloud-netflix.version>
@ -73,7 +73,7 @@
<dependency> <dependency>
<groupId>io.projectreactor</groupId> <groupId>io.projectreactor</groupId>
<artifactId>reactor-bom</artifactId> <artifactId>reactor-bom</artifactId>
<version>${reactor.version}</version> <version>${reactor-bom.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>

4
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/actuate/GatewayEndpoint.java

@ -26,8 +26,8 @@ import java.util.Optional;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.cloud.gateway.model.Route; import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.gateway.model.RouteLocator; import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.cloud.gateway.model.RouteWriter; import org.springframework.cloud.gateway.api.RouteWriter;
import org.springframework.cloud.gateway.filter.GlobalFilter; import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.cloud.gateway.filter.route.RouteFilter; import org.springframework.cloud.gateway.filter.route.RouteFilter;
import org.springframework.cloud.gateway.handler.FilteringWebHandler; import org.springframework.cloud.gateway.handler.FilteringWebHandler;

3
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/model/RouteLocator.java → spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/api/RouteLocator.java

@ -15,8 +15,9 @@
* *
*/ */
package org.springframework.cloud.gateway.model; package org.springframework.cloud.gateway.api;
import org.springframework.cloud.gateway.model.Route;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;
/** /**

3
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/model/RouteWriter.java → spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/api/RouteWriter.java

@ -15,8 +15,9 @@
* *
*/ */
package org.springframework.cloud.gateway.model; package org.springframework.cloud.gateway.api;
import org.springframework.cloud.gateway.model.Route;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
/** /**

4
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/config/GatewayAutoConfiguration.java

@ -28,8 +28,8 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.cloud.gateway.actuate.GatewayEndpoint; import org.springframework.cloud.gateway.actuate.GatewayEndpoint;
import org.springframework.cloud.gateway.filter.route.PrefixPathRouteFilter; import org.springframework.cloud.gateway.filter.route.PrefixPathRouteFilter;
import org.springframework.cloud.gateway.model.RouteLocator; import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.cloud.gateway.model.RouteWriter; import org.springframework.cloud.gateway.api.RouteWriter;
import org.springframework.cloud.gateway.filter.GlobalFilter; import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.cloud.gateway.filter.LoadBalancerClientFilter; import org.springframework.cloud.gateway.filter.LoadBalancerClientFilter;
import org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter; import org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter;

2
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/config/PropertiesRouteLocator.java

@ -18,7 +18,7 @@
package org.springframework.cloud.gateway.config; package org.springframework.cloud.gateway.config;
import org.springframework.cloud.gateway.model.Route; import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.gateway.model.RouteLocator; import org.springframework.cloud.gateway.api.RouteLocator;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;

2
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/discovery/DiscoveryClientRouteLocator.java

@ -23,7 +23,7 @@ import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.gateway.model.FilterDefinition; import org.springframework.cloud.gateway.model.FilterDefinition;
import org.springframework.cloud.gateway.model.PredicateDefinition; import org.springframework.cloud.gateway.model.PredicateDefinition;
import org.springframework.cloud.gateway.model.Route; import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.gateway.model.RouteLocator; import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.cloud.gateway.filter.route.RewritePathRouteFilter; import org.springframework.cloud.gateway.filter.route.RewritePathRouteFilter;
import org.springframework.cloud.gateway.handler.predicate.PathRoutePredicate; import org.springframework.cloud.gateway.handler.predicate.PathRoutePredicate;

2
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/handler/RoutePredicateHandlerMapping.java

@ -26,7 +26,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function; import java.util.function.Function;
import java.util.function.Predicate; import java.util.function.Predicate;
import org.springframework.cloud.gateway.model.RouteLocator; import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.cloud.gateway.model.Route; import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.gateway.model.PredicateDefinition; import org.springframework.cloud.gateway.model.PredicateDefinition;
import org.springframework.cloud.gateway.handler.predicate.RoutePredicate; import org.springframework.cloud.gateway.handler.predicate.RoutePredicate;

2
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/support/CachingRouteLocator.java

@ -21,7 +21,7 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import org.springframework.cloud.gateway.model.Route; import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.gateway.model.RouteLocator; import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.context.event.EventListener; import org.springframework.context.event.EventListener;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;

2
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/support/CompositeRouteLocator.java

@ -18,7 +18,7 @@
package org.springframework.cloud.gateway.support; package org.springframework.cloud.gateway.support;
import org.springframework.cloud.gateway.model.Route; import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.gateway.model.RouteLocator; import org.springframework.cloud.gateway.api.RouteLocator;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;
/** /**

4
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/support/InMemoryRouteRepository.java

@ -21,8 +21,8 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import org.springframework.cloud.gateway.model.Route; import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.gateway.model.RouteLocator; import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.cloud.gateway.model.RouteWriter; import org.springframework.cloud.gateway.api.RouteWriter;
import static java.util.Collections.synchronizedMap; import static java.util.Collections.synchronizedMap;

5
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/BaseWebClientTests.java

@ -26,10 +26,9 @@ import java.util.Map;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.junit.Before; import org.junit.Before;
import org.springframework.boot.context.embedded.LocalServerPort; import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.cloud.gateway.EnableGateway; import org.springframework.cloud.gateway.EnableGateway;
import org.springframework.cloud.gateway.filter.GlobalFilter; import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.cloud.gateway.filter.route.RouteFilter;
import org.springframework.cloud.gateway.model.Route; import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.netflix.ribbon.RibbonClient; import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients; import org.springframework.cloud.netflix.ribbon.RibbonClients;
@ -37,14 +36,12 @@ import org.springframework.cloud.netflix.ribbon.StaticServerList;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.reactive.function.client.WebClient;
import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.Server;
import com.netflix.loadbalancer.ServerList; import com.netflix.loadbalancer.ServerList;

2
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/GatewayTestApplication.java

@ -23,7 +23,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.gateway.EnableGateway; import org.springframework.cloud.gateway.EnableGateway;
import org.springframework.cloud.gateway.model.RouteLocator; import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.cloud.gateway.config.GatewayProperties; import org.springframework.cloud.gateway.config.GatewayProperties;
import org.springframework.cloud.gateway.config.PropertiesRouteLocator; import org.springframework.cloud.gateway.config.PropertiesRouteLocator;
import org.springframework.cloud.gateway.discovery.DiscoveryClientRouteLocator; import org.springframework.cloud.gateway.discovery.DiscoveryClientRouteLocator;

2
spring-cloud-gateway-sample/src/main/java/org/springframework/cloud/gateway/sample/GatewaySampleApplication.java

@ -21,7 +21,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.gateway.EnableGateway; import org.springframework.cloud.gateway.EnableGateway;
import org.springframework.cloud.gateway.model.RouteLocator; import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.cloud.gateway.config.GatewayProperties; import org.springframework.cloud.gateway.config.GatewayProperties;
import org.springframework.cloud.gateway.config.PropertiesRouteLocator; import org.springframework.cloud.gateway.config.PropertiesRouteLocator;
import org.springframework.cloud.gateway.support.CachingRouteLocator; import org.springframework.cloud.gateway.support.CachingRouteLocator;

2
spring-cloud-gateway-sample/src/test/java/org/springframework/cloud/gateway/sample/GatewaySampleApplicationTests.java

@ -20,8 +20,8 @@ package org.springframework.cloud.gateway.sample;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.boot.context.embedded.LocalServerPort;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;

Loading…
Cancel
Save