Browse Source

Removes deprecated methods.

pull/222/head
Spencer Gibb 7 years ago
parent
commit
9a017e2320
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 18
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/Route.java
  2. 2
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/RouteDefinitionRouteLocator.java
  3. 20
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java

18
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/Route.java

@ -133,34 +133,16 @@ public class Route implements Ordered { @@ -133,34 +133,16 @@ public class Route implements Ordered {
return this;
}
/** @deprecated use {@link #replaceFilters(List)} */
@Deprecated
public Builder gatewayFilters(List<GatewayFilter> gatewayFilters) {
return replaceFilters(gatewayFilters);
}
public Builder replaceFilters(List<GatewayFilter> gatewayFilters) {
this.gatewayFilters = gatewayFilters;
return this;
}
/** @deprecated use {@link #filter(GatewayFilter)} */
@Deprecated
public Builder add(GatewayFilter gatewayFilter) {
return filter(gatewayFilter);
}
public Builder filter(GatewayFilter gatewayFilter) {
this.gatewayFilters.add(gatewayFilter);
return this;
}
/** @deprecated use {@link #filters(Collection)} */
@Deprecated
public Builder addAll(Collection<GatewayFilter> gatewayFilters) {
return filters(gatewayFilters);
}
public Builder filters(Collection<GatewayFilter> gatewayFilters) {
this.gatewayFilters.addAll(gatewayFilters);
return this;

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

@ -120,7 +120,7 @@ public class RouteDefinitionRouteLocator implements RouteLocator, BeanFactoryAwa @@ -120,7 +120,7 @@ public class RouteDefinitionRouteLocator implements RouteLocator, BeanFactoryAwa
return Route.builder(routeDefinition)
.predicate(predicate)
.gatewayFilters(gatewayFilters)
.replaceFilters(gatewayFilters)
.build();
}

20
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java

@ -69,19 +69,6 @@ public class GatewayFilterSpec extends UriSpec { @@ -69,19 +69,6 @@ public class GatewayFilterSpec extends UriSpec {
super(routeBuilder, builder);
}
/** @deprecated use {@link #filters(Collection)} */
@Deprecated
public GatewayFilterSpec gatewayFilters(List<GatewayFilter> gatewayFilters) {
this.addAll(gatewayFilters);
return this;
}
/** @deprecated use {@link #filter(GatewayFilter)} */
@Deprecated
public GatewayFilterSpec add(GatewayFilter gatewayFilter) {
return this.filter(gatewayFilter);
}
public GatewayFilterSpec filter(GatewayFilter gatewayFilter) {
if (gatewayFilter instanceof Ordered) {
this.routeBuilder.filter(gatewayFilter);
@ -101,13 +88,6 @@ public class GatewayFilterSpec extends UriSpec { @@ -101,13 +88,6 @@ public class GatewayFilterSpec extends UriSpec {
return this;
}
/** @deprecated use {@link #filters(Collection)} */
@Deprecated
public GatewayFilterSpec addAll(Collection<GatewayFilter> gatewayFilters) {
this.routeBuilder.addAll(gatewayFilters);
return this;
}
public GatewayFilterSpec filters(GatewayFilter... gatewayFilters) {
this.routeBuilder.filters(gatewayFilters);
return this;

Loading…
Cancel
Save