Browse Source

Merge branch '2.2.x'

pull/1664/head
Spencer Gibb 5 years ago
parent
commit
5b098f2c71
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 3
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/RewritePathGatewayFilterFactory.java
  2. 1
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/RouteDefinitionRouteLocator.java

3
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/RewritePathGatewayFilterFactory.java

@ -24,6 +24,7 @@ import reactor.core.publisher.Mono; @@ -24,6 +24,7 @@ import reactor.core.publisher.Mono;
import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.util.Assert;
import org.springframework.web.server.ServerWebExchange;
import static org.springframework.cloud.gateway.support.GatewayToStringStyler.filterToStringCreator;
@ -93,6 +94,7 @@ public class RewritePathGatewayFilterFactory @@ -93,6 +94,7 @@ public class RewritePathGatewayFilterFactory
}
public Config setRegexp(String regexp) {
Assert.hasText(regexp, "regexp must have a value");
this.regexp = regexp;
return this;
}
@ -102,6 +104,7 @@ public class RewritePathGatewayFilterFactory @@ -102,6 +104,7 @@ public class RewritePathGatewayFilterFactory
}
public Config setReplacement(String replacement) {
Assert.notNull(replacement, "replacement must not be null");
this.replacement = replacement;
return this;
}

1
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/RouteDefinitionRouteLocator.java

@ -187,7 +187,6 @@ public class RouteDefinitionRouteLocator implements RouteLocator { @@ -187,7 +187,6 @@ public class RouteDefinitionRouteLocator implements RouteLocator {
new ArrayList<>(routeDefinition.getFilters())));
}
Flux.just().onErrorContinue()
AnnotationAwareOrderComparator.sort(filters);
return filters;
}

Loading…
Cancel
Save