Spring Cloud Gateway logo

Spring Cloud Gateway

Community
rrezartprebreza
spring-cloud-gateway

Use when building Spring Cloud Gateway 5 on Spring Boot 4, including WebFlux or Web MVC routes, edge authentication, trusted headers, rate limits, timeouts, and resilience. Do not use for ordinary outbound HTTP clients or domain orchestration.

Overview

Publisherrrezartprebreza
Repositoryspring-boot-skills
Skill namespring-cloud-gateway
Stars
322
Forks
52
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by rrezartprebreza on GitHub. Read the source before you install it.

Installation

Install the Spring Cloud Gateway AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/rrezartprebreza/spring-boot-skills/tree/main/skills/spring-boot-4/spring-cloud-gateway
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rrezartprebreza/spring-boot-skills.git /tmp/spring-boot-skills
mkdir -p .claude/skills
cp -r /tmp/spring-boot-skills/skills/spring-boot-4/spring-cloud-gateway .claude/skills/spring-cloud-gateway
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Spring Cloud Gateway in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Spring Cloud Gateway on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Spring Cloud Gateway is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Spring Cloud Gateway 5

Keep the gateway an edge adapter. Do not move domain workflows into filters.

Compatibility and dependencies

  • Use the latest Spring Cloud 2025.1.x release train for Spring Boot 4.
  • Boot 4.1 support starts with Spring Cloud 2025.1.2.
  • Import spring-cloud-dependencies as a BOM and omit versions from individual Cloud dependencies.
  • Choose exactly one gateway runtime.
xml
<!-- Reactive Netty gateway -->
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-gateway-server-webflux</artifactId>
</dependency>

<!-- OR servlet gateway: spring-cloud-starter-gateway-server-webmvc -->

Do not use the old spring-cloud-starter-gateway coordinate or force a Boot 3 release train onto Boot 4. WebFlux requires Reactor Netty and cannot run as a traditional servlet WAR; Web MVC uses a servlet runtime and WebMvc.fn.

Gateway 5 configuration namespaces

Gateway 5 separates server implementations in configuration:

  • WebFlux: spring.cloud.gateway.server.webflux.*
  • Web MVC: spring.cloud.gateway.server.webmvc.*
yaml
spring:
  cloud:
    gateway:
      server:
        webflux:
          httpclient:
            connect-timeout: 2000
            response-timeout: 5s
          routes:
            - id: orders-api
              uri: http://orders.internal
              predicates:
                - Path=/api/orders/**
              filters:
                - RemoveRequestHeader=X-User-Id

The Boot 3-era spring.cloud.gateway.routes and spring.cloud.gateway.httpclient paths do not bind to Gateway 5's WebFlux server properties.

Route and security rules

  • Use stable route IDs and explicit predicates.
  • Remove client-provided forwarding, identity, and internal headers before creating trusted values.
  • Keep path and host rewriting visible and covered by tests.
  • Authenticate at the edge and authorize again in downstream services.
  • Relay tokens only to services with the intended audience.
  • Rate-limit by authenticated identity or a verified API key, not an untrusted address header.
  • Set global connection and response timeouts with narrow route overrides.
  • Retry only proven idempotent operations and only before response commitment.
  • Keep fallbacks bounded and expose sustained upstream failure.

Testing and operations

  • Test predicates, filters, trusted headers, CORS, timeouts, body limits, and status mapping.
  • Use a controlled upstream server rather than mocking gateway internals.
  • Record route ID, outcome, latency, and upstream failure with bounded metric tags.
  • Test each selected runtime with its matching Spring Cloud Gateway test support.

Examples

  • examples/good-routes.yml shows Gateway 5 WebFlux configuration.
  • examples/good-webmvc-routes.yml shows Gateway 5 Web MVC configuration.
  • examples/bad-routes.yml preserves the stale configuration as a warning.

Official sources

Gotchas

  • Agent uses spring.cloud.gateway.routes on Gateway 5 - use the server-specific namespace.
  • Agent uses spring-cloud-starter-gateway on Boot 4 - select the WebFlux or Web MVC server starter.
  • Agent selects a Cloud train without checking the exact Boot line - use the compatibility matrix.
  • Agent trusts a public identity header - derive identity after authentication.
  • Agent retries POST requests automatically - retry only proven idempotent operations.
  • Agent puts business orchestration in filters - keep domain logic downstream.
  • Agent omits response timeouts - stalled upstreams can exhaust resources.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Spring Cloud Gateway AI skill do?

Use when building Spring Cloud Gateway 5 on Spring Boot 4, including WebFlux or Web MVC routes, edge authentication, trusted headers, rate limits, timeouts, and resilience. Do not use for ordinary outbound HTTP clients or domain orchestration.

Why use Spring Cloud Gateway on TypingMind?

Because you install it once and use it with any model. Spring Cloud Gateway is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Spring Cloud Gateway in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/rrezartprebreza/spring-boot-skills/tree/main/skills/spring-boot-4/spring-cloud-gateway. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Spring Cloud Gateway?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Spring Cloud Gateway?

As many as you like. As long as a model supports skills, you can use Spring Cloud Gateway with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Spring Cloud Gateway AI skill free?

Yes. It is published on GitHub by rrezartprebreza under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇