diff --git a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/Route.java b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/Route.java index b43b4d4e8..94d6e90d6 100644 --- a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/Route.java +++ b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/Route.java @@ -133,34 +133,16 @@ public class Route implements Ordered { return this; } - /** @deprecated use {@link #replaceFilters(List)} */ - @Deprecated - public Builder gatewayFilters(List gatewayFilters) { - return replaceFilters(gatewayFilters); - } - public Builder replaceFilters(List 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 gatewayFilters) { - return filters(gatewayFilters); - } - public Builder filters(Collection gatewayFilters) { this.gatewayFilters.addAll(gatewayFilters); return this; diff --git a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/RouteDefinitionRouteLocator.java b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/RouteDefinitionRouteLocator.java index 88794d493..5076b47f5 100644 --- a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/RouteDefinitionRouteLocator.java +++ b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/RouteDefinitionRouteLocator.java @@ -120,7 +120,7 @@ public class RouteDefinitionRouteLocator implements RouteLocator, BeanFactoryAwa return Route.builder(routeDefinition) .predicate(predicate) - .gatewayFilters(gatewayFilters) + .replaceFilters(gatewayFilters) .build(); } diff --git a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java index 4a6aedca0..31382e724 100644 --- a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java +++ b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java @@ -69,19 +69,6 @@ public class GatewayFilterSpec extends UriSpec { super(routeBuilder, builder); } - /** @deprecated use {@link #filters(Collection)} */ - @Deprecated - public GatewayFilterSpec gatewayFilters(List 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 { return this; } - /** @deprecated use {@link #filters(Collection)} */ - @Deprecated - public GatewayFilterSpec addAll(Collection gatewayFilters) { - this.routeBuilder.addAll(gatewayFilters); - return this; - } - public GatewayFilterSpec filters(GatewayFilter... gatewayFilters) { this.routeBuilder.filters(gatewayFilters); return this;