Rename filter.route package to filter.factory

This commit is contained in:
Spencer Gibb
2017-03-15 10:55:00 -06:00
parent a97ca9f9f1
commit cee2dc71ed
37 changed files with 73 additions and 74 deletions

View File

@@ -29,7 +29,7 @@ import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.cloud.gateway.api.RouteWriter;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.cloud.gateway.filter.route.WebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.WebFilterFactory;
import org.springframework.cloud.gateway.handler.FilteringWebHandler;
import org.springframework.cloud.gateway.support.NotFoundException;
import org.springframework.cloud.gateway.support.RefreshRoutesEvent;

View File

@@ -33,22 +33,22 @@ import org.springframework.cloud.gateway.filter.LoadBalancerClientFilter;
import org.springframework.cloud.gateway.filter.NettyRoutingFilter;
import org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter;
import org.springframework.cloud.gateway.filter.WriteResponseFilter;
import org.springframework.cloud.gateway.filter.route.AddRequestHeaderWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.AddRequestParameterWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.AddResponseHeaderWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.HystrixWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.PrefixPathWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.RedirectToWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.RemoveNonProxyHeadersWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.RemoveRequestHeaderWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.RemoveResponseHeaderWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.RewritePathWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.SecureHeadersWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.SetResponseHeaderWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.WebFilterFactory;
import org.springframework.cloud.gateway.filter.route.SecureHeadersProperties;
import org.springframework.cloud.gateway.filter.route.SetPathWebFilterFactory;
import org.springframework.cloud.gateway.filter.route.SetStatusWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.AddRequestHeaderWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.AddRequestParameterWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.AddResponseHeaderWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.HystrixWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.PrefixPathWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.RedirectToWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.RemoveNonProxyHeadersWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.RemoveRequestHeaderWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.RemoveResponseHeaderWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.RewritePathWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.SecureHeadersWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.SetResponseHeaderWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.WebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.SecureHeadersProperties;
import org.springframework.cloud.gateway.filter.factory.SetPathWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.SetStatusWebFilterFactory;
import org.springframework.cloud.gateway.handler.FilteringWebHandler;
import org.springframework.cloud.gateway.handler.NettyRoutingWebHandler;
import org.springframework.cloud.gateway.handler.RequestPredicateHandlerMapping;

View File

@@ -26,7 +26,7 @@ import javax.validation.constraints.NotNull;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.gateway.model.FilterDefinition;
import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.gateway.filter.route.RemoveNonProxyHeadersWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.RemoveNonProxyHeadersWebFilterFactory;
import static org.springframework.cloud.gateway.support.NameUtils.normalizeFilterName;

View File

@@ -22,7 +22,7 @@ import java.util.Collections;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.gateway.api.RouteLocator;
import org.springframework.cloud.gateway.filter.route.RewritePathWebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.RewritePathWebFilterFactory;
import org.springframework.cloud.gateway.handler.predicate.PathRequestPredicateFactory;
import org.springframework.cloud.gateway.model.FilterDefinition;
import org.springframework.cloud.gateway.model.PredicateDefinition;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.web.server.WebFilter;
import org.springframework.http.server.reactive.ServerHttpRequest;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import java.net.URI;
import java.net.URISyntaxException;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.web.server.WebFilter;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.web.server.WebFilter;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import java.net.MalformedURLException;
import java.net.URI;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.http.server.reactive.ServerHttpRequest;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.web.server.WebFilter;
import org.springframework.http.server.reactive.ServerHttpRequest;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.web.server.WebFilter;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.web.server.WebFilter;
import org.springframework.http.server.reactive.ServerHttpRequest;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.boot.context.properties.ConfigurationProperties;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.http.HttpHeaders;
import org.springframework.web.server.WebFilter;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import java.net.URI;
import java.util.Map;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.web.server.WebFilter;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.cloud.gateway.support.ServerWebExchangeUtils;
import org.springframework.http.HttpStatus;

View File

@@ -15,8 +15,7 @@
*
*/
//TODO: move to package factory
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.springframework.cloud.gateway.support.NameUtils;
import org.springframework.util.Assert;

View File

@@ -31,7 +31,7 @@ import java.util.stream.Collectors;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.cloud.gateway.filter.route.WebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.WebFilterFactory;
import org.springframework.cloud.gateway.model.FilterDefinition;
import org.springframework.cloud.gateway.model.Route;
import org.springframework.cloud.gateway.config.GatewayProperties;

View File

@@ -17,7 +17,7 @@
package org.springframework.cloud.gateway.support;
import org.springframework.cloud.gateway.filter.route.WebFilterFactory;
import org.springframework.cloud.gateway.filter.factory.WebFilterFactory;
import org.springframework.cloud.gateway.handler.predicate.RequestPredicateFactory;
/**

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import java.util.Map;
@@ -32,7 +32,7 @@ import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
import static org.springframework.cloud.gateway.filter.route.RemoveNonProxyHeadersWebFilterFactory.DEFAULT_HEADERS_TO_REMOVE;
import static org.springframework.cloud.gateway.filter.factory.RemoveNonProxyHeadersWebFilterFactory.DEFAULT_HEADERS_TO_REMOVE;
import static org.springframework.cloud.gateway.test.TestUtils.getMap;
import static org.springframework.web.reactive.function.BodyExtractors.toMono;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.assertj.core.api.Assertions;
import org.junit.Test;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -32,14 +32,14 @@ import org.springframework.web.reactive.function.client.ClientResponse;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
import static org.springframework.cloud.gateway.filter.route.SecureHeadersWebFilterFactory.CONTENT_SECURITY_POLICY_HEADER;
import static org.springframework.cloud.gateway.filter.route.SecureHeadersWebFilterFactory.REFERRER_POLICY_HEADER;
import static org.springframework.cloud.gateway.filter.route.SecureHeadersWebFilterFactory.STRICT_TRANSPORT_SECURITY_HEADER;
import static org.springframework.cloud.gateway.filter.route.SecureHeadersWebFilterFactory.X_CONTENT_TYPE_OPTIONS_HEADER;
import static org.springframework.cloud.gateway.filter.route.SecureHeadersWebFilterFactory.X_DOWNLOAD_OPTIONS_HEADER;
import static org.springframework.cloud.gateway.filter.route.SecureHeadersWebFilterFactory.X_FRAME_OPTIONS_HEADER;
import static org.springframework.cloud.gateway.filter.route.SecureHeadersWebFilterFactory.X_PERMITTED_CROSS_DOMAIN_POLICIES_HEADER;
import static org.springframework.cloud.gateway.filter.route.SecureHeadersWebFilterFactory.X_XSS_PROTECTION_HEADER;
import static org.springframework.cloud.gateway.filter.factory.SecureHeadersWebFilterFactory.CONTENT_SECURITY_POLICY_HEADER;
import static org.springframework.cloud.gateway.filter.factory.SecureHeadersWebFilterFactory.REFERRER_POLICY_HEADER;
import static org.springframework.cloud.gateway.filter.factory.SecureHeadersWebFilterFactory.STRICT_TRANSPORT_SECURITY_HEADER;
import static org.springframework.cloud.gateway.filter.factory.SecureHeadersWebFilterFactory.X_CONTENT_TYPE_OPTIONS_HEADER;
import static org.springframework.cloud.gateway.filter.factory.SecureHeadersWebFilterFactory.X_DOWNLOAD_OPTIONS_HEADER;
import static org.springframework.cloud.gateway.filter.factory.SecureHeadersWebFilterFactory.X_FRAME_OPTIONS_HEADER;
import static org.springframework.cloud.gateway.filter.factory.SecureHeadersWebFilterFactory.X_PERMITTED_CROSS_DOMAIN_POLICIES_HEADER;
import static org.springframework.cloud.gateway.filter.factory.SecureHeadersWebFilterFactory.X_XSS_PROTECTION_HEADER;
import static org.springframework.cloud.gateway.test.TestUtils.assertStatus;
import reactor.core.publisher.Mono;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import java.util.HashMap;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -15,7 +15,7 @@
*
*/
package org.springframework.cloud.gateway.filter.route;
package org.springframework.cloud.gateway.filter.factory;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -21,19 +21,19 @@ import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
import org.springframework.cloud.gateway.filter.route.AddRequestHeaderWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.route.AddRequestParameterWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.route.HystrixWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.route.RedirectToWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.route.RemoveNonProxyHeadersWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.route.RemoveRequestHeaderWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.route.RewritePathWebFilterFactoryIntegrationTests;
import org.springframework.cloud.gateway.filter.route.RewritePathWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.route.SecureHeadersWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.route.SetPathWebFilterFactoryIntegrationTests;
import org.springframework.cloud.gateway.filter.route.SetPathWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.route.SetResponseWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.route.SetStatusWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.AddRequestHeaderWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.AddRequestParameterWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.HystrixWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.RedirectToWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.RemoveNonProxyHeadersWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.RemoveRequestHeaderWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.RewritePathWebFilterFactoryIntegrationTests;
import org.springframework.cloud.gateway.filter.factory.RewritePathWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.SecureHeadersWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.SetPathWebFilterFactoryIntegrationTests;
import org.springframework.cloud.gateway.filter.factory.SetPathWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.SetResponseWebFilterFactoryTests;
import org.springframework.cloud.gateway.filter.factory.SetStatusWebFilterFactoryTests;
import org.springframework.cloud.gateway.handler.predicate.AfterRequestPredicateFactoryTests;
import org.springframework.cloud.gateway.handler.predicate.BeforeRequestPredicateFactoryTests;
import org.springframework.cloud.gateway.handler.predicate.BetweenRequestPredicateFactoryTests;