A Gateway built on Spring Framework and Spring Boot providing routing and more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

288 lines
8.4 KiB

8 years ago
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
8 years ago
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
8 years ago
<artifactId>spring-cloud-gateway</artifactId>
<version>4.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
8 years ago
<name>Spring Cloud Gateway</name>
<description>Spring Cloud Gateway</description>
8 years ago
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>4.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<scm>
5 years ago
<url>https://github.com/spring-cloud/spring-cloud-gateway</url>
<connection>
5 years ago
scm:git:git://github.com/spring-cloud/spring-cloud-gateway.git
</connection>
<developerConnection>
5 years ago
scm:git:ssh://git@github.com/spring-cloud/spring-cloud-gateway.git
</developerConnection>
<tag>HEAD</tag>
</scm>
8 years ago
<licenses>
<license>
<name>Apache License, Version 2.0</name>
URL Cleanup (#892) This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch migrated to: https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch ([https](https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch) result 200). * http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin migrated to: https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin ([https](https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin) result 200). * http://www.apache.org/licenses/LICENSE-2.0 migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200). * http://www.spring.io migrated to: https://www.spring.io ([https](https://www.spring.io) result 301). # Ignored These URLs were intentionally ignored. * http://maven.apache.org/POM/4.0.0 * http://maven.apache.org/xsd/maven-4.0.0.xsd * http://www.w3.org/2001/XMLSchema-instance
6 years ago
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<developers>
<developer>
<id>sgibb</id>
<name>Spencer Gibb</name>
<email>sgibb at pivotal.io</email>
<organization>Pivotal Software, Inc.</organization>
URL Cleanup (#892) This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch migrated to: https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch ([https](https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch) result 200). * http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin migrated to: https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin ([https](https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin) result 200). * http://www.apache.org/licenses/LICENSE-2.0 migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200). * http://www.spring.io migrated to: https://www.spring.io ([https](https://www.spring.io) result 301). # Ignored These URLs were intentionally ignored. * http://maven.apache.org/POM/4.0.0 * http://maven.apache.org/xsd/maven-4.0.0.xsd * http://www.w3.org/2001/XMLSchema-instance
6 years ago
<organizationUrl>https://www.spring.io</organizationUrl>
<roles>
<role>Project lead</role>
</roles>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<bucket4j.version>8.6.0</bucket4j.version>
<blockhound.version>1.0.6.RELEASE</blockhound.version>
<java.version>17</java.version>
<junit-pioneer.version>1.9.1</junit-pioneer.version>
<spring-cloud-circuitbreaker.version>3.1.0-SNAPSHOT</spring-cloud-circuitbreaker.version>
<spring-cloud-commons.version>4.1.0-SNAPSHOT</spring-cloud-commons.version>
<testcontainers.version>1.19.1</testcontainers.version>
</properties>
8 years ago
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gateway-dependencies</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-dependencies</artifactId>
<version>${spring-cloud-commons.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-test-support</artifactId>
<version>${spring-cloud-commons.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-circuitbreaker-dependencies</artifactId>
<version>${spring-cloud-circuitbreaker.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-circuitbreaker-reactor-resilience4j</artifactId>
<version>${spring-cloud-circuitbreaker.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>${spring-boot.version}</version>
</dependency>
MVC Gateway Server (#2949) * Initial support for Gateway Server MVC Includes: - FilterFunctions - HandlerFunctions - TestRestClient Fixes gh-36 * Adds ProxyExchange abstraction and RestTemplate impl. Also formatting and polish * Migrates from RestTemplateProxyExchange to ClientHttpRequestFactoryProxyExchange Also implements GatewayServerResponse that is mutable. * Removes RestTemplateProxyExchange.javaˆ * Allows resolving uri by request attribute * formattingˆ * Moved beans to GatewayServerMvcAutoConfiguration * Removes unneeded GatewayServerRequestBuilder.javaˆ * Adds addRequestParameter filter * Adds FilterFunctions.setPath() * Moves FilterFunctions.addResponseHeader() * Adds FilterFunctions.stripPrefix() * Moves ProxyExchangeHandlerFunction to bean. This allows easier autoconfiguration. * Adds HttpHeadersFilter and RemoveHopByHopR*HeadersFilter * removes unused imports * Initial local configuration compatibility with webflux server. Borrows Operation framework from Spring Boot Actuator. Discoverable predicates and filters are found via spring.factories. Currently only static methods are supported. Shortcut configuration is not yet supported. * Organized classes into individual packages * Copy request body to proxy exchange client request body * Changes getApplicationContext() to user RequestContextUtils rather than relying on the DispatcherServlet attribute. * Moves content to MvcUtils.java * Allows for multiple predicates and filters with the same name. * a get only route is to0 broad and causes a request loop * Save the anded predicate, whoops. Adds some trace logging as well. * Adds initial support for load balancing * Moves TestRestClient to client package * Moves handler related classes to handler package * Creates HandlerDiscoverer to dynamically load HandlerFunctions * polish * polish * Extracts findOperation()ˆ * Extracts invokeOperation() * Adds support for config uri type lb://serviceId * Adds uri template variable support. Adds supporting methods to MvcUtils.java. Expands uri templates in existing filters. * Adds support for host predicate * Adds support for circuit breaker filter * Adds initial support for retry filter * Adds initial support for Bucket4j rateLimit filter * Removes separate *Supplier classes if not needed. * Adds header request predicate * Fixes accept() methods to better values. * Adds support for cookie predicate * Adds support for after, before and between time predicates * Adds support for FilterFunctions.rewritePath() * Adds support for shortcut configuration. Adds Shortcut annotation to provide hints. Extracts OperationMethod into an interface with DefaultOperationMethod the impl. Adds NormalizedOperationMethod which uses the Shortcut annotation to normalize the arguments and give them the right keys. All Shortcut logic is here. * Format comments * Adds support for Forwarded and X-Forwarded-* Headers * Moves TestLoadBalancerConfig to top level to shareˆ * Uses JdkClientHttpRequestFactory. * Adds routeId to RouterFunction.withAttribute() * Adds toString()ˆ * Shows sample of combining java dsl * Implements refresh of config based routes. * Adds support for proxying multipart form data. * removes unneeded multipart propertyˆ * Adds support for RestClientProxyExchange Not yet the default. Waiting for a change that will eliminate reflection in RestClientProxyExchange Created ProxyExchange.DefaultRequestBuilder as the code was duplicated in the two implementations. * polishes ProxyExchangeHandlerFunction * Adds ProxyExchange.ResponseConsumer Adds ProxyExchange.Response and migrates away from ResponseHeadersFilter on the request to something more generic. * Closes clientHttpResponse appropriately. * Closes clientHttpResponse appropriately. * Updates to use new WriteFunction interface * Removes unused apache httpclient5 dependency * Uses new RestClientCustomizer to add ClientHttpRequestFactory. Changes constructor of RestClientProxyExchange to take a RestClient.
1 year ago
<dependency>
<groupId>com.bucket4j</groupId>
<artifactId>bucket4j-core</artifactId>
<version>${bucket4j.version}</version>
</dependency>
<dependency>
<groupId>com.bucket4j</groupId>
<artifactId>bucket4j-caffeine</artifactId>
<version>${bucket4j.version}</version>
</dependency>
<dependency>
<groupId>io.projectreactor.tools</groupId>
<artifactId>blockhound</artifactId>
<version>${blockhound.version}</version>
</dependency>
<dependency>
<groupId>io.projectreactor.tools</groupId>
<artifactId>blockhound-junit-platform</artifactId>
<version>${blockhound.version}</version>
</dependency>
<dependency>
<groupId>org.junit-pioneer</groupId>
<artifactId>junit-pioneer</artifactId>
<version>${junit-pioneer.version}</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
8 years ago
</dependencies>
</dependencyManagement>
<modules>
<module>spring-cloud-gateway-dependencies</module>
<module>spring-cloud-gateway-mvc</module>
<module>spring-cloud-gateway-webflux</module>
<module>spring-cloud-gateway-server</module>
MVC Gateway Server (#2949) * Initial support for Gateway Server MVC Includes: - FilterFunctions - HandlerFunctions - TestRestClient Fixes gh-36 * Adds ProxyExchange abstraction and RestTemplate impl. Also formatting and polish * Migrates from RestTemplateProxyExchange to ClientHttpRequestFactoryProxyExchange Also implements GatewayServerResponse that is mutable. * Removes RestTemplateProxyExchange.javaˆ * Allows resolving uri by request attribute * formattingˆ * Moved beans to GatewayServerMvcAutoConfiguration * Removes unneeded GatewayServerRequestBuilder.javaˆ * Adds addRequestParameter filter * Adds FilterFunctions.setPath() * Moves FilterFunctions.addResponseHeader() * Adds FilterFunctions.stripPrefix() * Moves ProxyExchangeHandlerFunction to bean. This allows easier autoconfiguration. * Adds HttpHeadersFilter and RemoveHopByHopR*HeadersFilter * removes unused imports * Initial local configuration compatibility with webflux server. Borrows Operation framework from Spring Boot Actuator. Discoverable predicates and filters are found via spring.factories. Currently only static methods are supported. Shortcut configuration is not yet supported. * Organized classes into individual packages * Copy request body to proxy exchange client request body * Changes getApplicationContext() to user RequestContextUtils rather than relying on the DispatcherServlet attribute. * Moves content to MvcUtils.java * Allows for multiple predicates and filters with the same name. * a get only route is to0 broad and causes a request loop * Save the anded predicate, whoops. Adds some trace logging as well. * Adds initial support for load balancing * Moves TestRestClient to client package * Moves handler related classes to handler package * Creates HandlerDiscoverer to dynamically load HandlerFunctions * polish * polish * Extracts findOperation()ˆ * Extracts invokeOperation() * Adds support for config uri type lb://serviceId * Adds uri template variable support. Adds supporting methods to MvcUtils.java. Expands uri templates in existing filters. * Adds support for host predicate * Adds support for circuit breaker filter * Adds initial support for retry filter * Adds initial support for Bucket4j rateLimit filter * Removes separate *Supplier classes if not needed. * Adds header request predicate * Fixes accept() methods to better values. * Adds support for cookie predicate * Adds support for after, before and between time predicates * Adds support for FilterFunctions.rewritePath() * Adds support for shortcut configuration. Adds Shortcut annotation to provide hints. Extracts OperationMethod into an interface with DefaultOperationMethod the impl. Adds NormalizedOperationMethod which uses the Shortcut annotation to normalize the arguments and give them the right keys. All Shortcut logic is here. * Format comments * Adds support for Forwarded and X-Forwarded-* Headers * Moves TestLoadBalancerConfig to top level to shareˆ * Uses JdkClientHttpRequestFactory. * Adds routeId to RouterFunction.withAttribute() * Adds toString()ˆ * Shows sample of combining java dsl * Implements refresh of config based routes. * Adds support for proxying multipart form data. * removes unneeded multipart propertyˆ * Adds support for RestClientProxyExchange Not yet the default. Waiting for a change that will eliminate reflection in RestClientProxyExchange Created ProxyExchange.DefaultRequestBuilder as the code was duplicated in the two implementations. * polishes ProxyExchangeHandlerFunction * Adds ProxyExchange.ResponseConsumer Adds ProxyExchange.Response and migrates away from ResponseHeadersFilter on the request to something more generic. * Closes clientHttpResponse appropriately. * Closes clientHttpResponse appropriately. * Updates to use new WriteFunction interface * Removes unused apache httpclient5 dependency * Uses new RestClientCustomizer to add ClientHttpRequestFactory. Changes constructor of RestClientProxyExchange to take a RestClient.
1 year ago
<module>spring-cloud-gateway-server-mvc</module>
<module>spring-cloud-starter-gateway</module>
<module>spring-cloud-starter-gateway-mvc</module>
<module>spring-cloud-gateway-sample</module>
<module>spring-cloud-gateway-integration-tests</module>
<module>docs</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>spring</id>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>sonar</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>surefireArgLine</propertyName>
<destFile>${project.build.directory}/jacoco.exec
</destFile>
</configuration>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>${project.build.directory}/jacoco.exec
</dataFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Sets the VM argument line used when unit tests are run. -->
<argLine>${surefireArgLine}</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>withoutDockerTests</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>DockerRequired</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
8 years ago
</project>