Spring Boot starter that runs gRPC servers and clients from annotations like @GrpcService and @GrpcClient, with no manual channel or server setup.
spring-cloud/spring-cloud-gateway
An API gateway built on Spring Framework and Spring Boot for routing and filtering HTTP requests in microservice setups.
- Stars
- 4,919
- Forks
- 3,481
- Open issues
- 565
- Last commit
- 18 hours ago
What is it?
Spring Cloud Gateway is an API gateway for Java applications built on Spring Framework 6 and Spring Boot 3, running on Java 17. It sits in front of backend services and routes incoming HTTP requests to them based on matching rules such as path, HTTP method, header, or host.
Routes are scoped filters: each filter applies only to the requests that match its route. Filters can add, remove or rewrite headers and parameters, rewrite or set the request path, and apply features such as a circuit breaker. Routes can be defined through the API or through configuration, and can also be populated from a Spring Cloud DiscoveryClient.
The project is built with Maven using the included ./mvnw wrapper and requires JDK 17. Tests that depend on middleware such as Redis need a local Docker instance running.
Key features
- 01Route matching on path, method, header, host and other request attributes
- 02Filters scoped to individual matching routes
- 03Filters can modify request and response headers, parameters and paths
- 04Circuit breaker support among built-in filters
- 05Routes configurable via API or configuration, or from Spring Cloud DiscoveryClient
Use cases
- Front-end routing for a set of Spring Boot microservices
- Adding or rewriting headers and paths before requests reach backend services
- Integrating service discovery so routes follow registered services
Quick start
- 1
Clone the project repository
- 2
Install JDK 17 and build the source with the Maven wrapper
./mvnw install
Things to know
- Requires JDK 17 to build.
- Some tests need a local Docker instance running.
In collections
Topics
FAQ
- What is spring-cloud-gateway?
- An API gateway built on Spring Framework and Spring Boot for routing and filtering HTTP requests in microservice setups. Spring Cloud Gateway is an API gateway for Java applications built on Spring Framework 6 and Spring Boot 3, running on Java 17. It sits in front of backend services and routes incoming HTTP requests to them based on matching rules such as path, HTTP method, header, or host.
- Is spring-cloud-gateway free to use? What license does it have?
- spring-cloud-gateway is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is spring-cloud-gateway still maintained?
- Actively maintained. The last commit to spring-cloud-gateway was on Nov 6, 2026.
- What can I use spring-cloud-gateway for?
- Front-end routing for a set of Spring Boot microservices Adding or rewriting headers and paths before requests reach backend services Integrating service discovery so routes follow registered services
- How do I install spring-cloud-gateway?
- Clone the project repository Install JDK 17 and build the source with the Maven wrapper: ./mvnw install
- Where can I get spring-cloud-gateway?
- The source code and installation instructions are on GitHub: https://github.com/spring-cloud/spring-cloud-gateway
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Kubernetes implementations of Spring Cloud interfaces, letting Spring Cloud apps use Kubernetes for service discovery and configuration.
A Java-based API gateway for service proxying, protocol conversion, and API governance, with a plugin chain and a central Admin console.
A Spring Cloud implementation that integrates Spring Cloud applications with Tencent's Polaris for service discovery and governance.
Web-based admin dashboard for monitoring and managing Spring Boot applications through their Actuator endpoints.
A Spring Cloud microservices scaffold with RBAC permissions, OAuth2/JWT auth, gateway, service governance and audit logging, ready for Docker and Kubernetes.