Skip to content

microsphere-projects/microsphere-gateway

Repository files navigation

Microsphere Gateway

Microsphere Projects for Gateway

Ask DeepWiki zread Maven Build Codecov Maven License

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.

Purpose and Scope

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

Modules

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

Getting Started

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>

Building from Source

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:

  1. Clone the repository:
git clone https://github.com/microsphere-projects/microsphere-gateway.git
  1. Build the source:
  • Linux/MacOS:
./mvnw package
  • Windows:
mvnw.cmd package

Contributing

We welcome your contributions! Please read Code of Conduct before submitting a pull request.

Reporting Issues

  • 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.

Documentation

User Guide

DeepWiki Host

ZRead Host

Wiki

Github Host

JavaDoc

License

The Microsphere Spring is released under the Apache License 2.0.

About

The microsphere projects for Gateway

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages