Microsphere Projects for Gateway
Microsphere Gateway is a sophisticated extension of the Spring Cloud Gateway ecosystem, providing enhanced API gateway capabilities with a focus on discovery, routing, and resilience. It offers two complementary implementations: a reactive solution based on Spring Cloud Gateway and a servlet-based solution using Spring MVC.
The microsphere-gateway project extends Spring Cloud Gateway with enhanced features including:
- Dual Implementation Strategy: Provides both reactive (microsphere-spring-cloud-gateway-server-webflux) and MVC-based ( microsphere-spring-cloud-gateway-server-webmvc) gateway implementations
- Enhanced Configuration Management: Centralized dependency management and auto-configuration capabilities
- Service Discovery Integration: Support for multiple service discovery systems including Eureka, Nacos, Consul, and Kubernetes
- Enterprise Features: Built-in fault tolerance, caching, and monitoring capabilities
| Module | Purpose |
|---|---|
| microsphere-gateway-parent | Defines the parent POM with dependency management and Spring Cloud version profiles |
| microsphere-gateway-dependencies | Centralizes dependency management for all project modules |
| microsphere-spring-cloud-gateway-commons | Gateway commons module |
| microsphere-spring-cloud-gateway-server-webflux | Reactive WebFlux-based gateway implementation |
| microsphere-spring-cloud-gateway-server-webmvc | Servlet-based MVC gateway implementation |
The easiest way to get started is by adding the Microsphere Gateway BOM (Bill of Materials) to your project's pom.xml:
<dependencyManagement>
<dependencies>
...
<!-- Microsphere Gateway Dependencies -->
<dependency>
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-gateway-dependencies</artifactId>
<version>${microsphere-gateway.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
...
</dependencies>
</dependencyManagement>${microsphere-spring-boot.version} has two branches:
| Branches | Purpose | Latest Version |
|---|---|---|
| 0.2.x | Compatible with Gateway 2022.0.x - 2025.0.x | 0.2.1 |
| 0.1.x | Compatible with Gateway Hoxton - 2021.0.x | 0.1.1 |
Then add the specific modules you need:
<dependencies>
<!-- Microsphere Spring Cloud Gateway WebFlux -->
<dependency>
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-spring-cloud-gateway-server-webflux</artifactId>
</dependency>
</dependencies>Using the MVC module if you are using Spring MVC:
<dependencies>
<!-- Microsphere Spring Cloud Gateway WebMVC -->
<dependency>
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-spring-cloud-gateway-server-webmvc</artifactId>
</dependency>
</dependencies>You don't need to build from source unless you want to try out the latest code or contribute to the project.
To build the project, follow these steps:
- Clone the repository:
git clone https://github.com/microsphere-projects/microsphere-gateway.git- Build the source:
- Linux/MacOS:
./mvnw package- Windows:
mvnw.cmd packageWe welcome your contributions! Please read Code of Conduct before submitting a pull request.
- Before you log a bug, please search the issues to see if someone has already reported the problem.
- If the issue doesn't already exist, create a new issue.
- Please provide as much information as possible with the issue report.
The Microsphere Spring is released under the Apache License 2.0.