spring-cloud-gateway

Solid

Use when building or changing a Spring Cloud Gateway on Spring Boot 3. Covers route design, authentication, header hygiene, rate limiting, retries, timeouts, observability, and testing.

AI & Automation 225 stars 37 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
78
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
95
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Spring Cloud Gateway Keep the gateway an edge adapter. Do not move domain workflows into filters. ## Compatibility first - Select the Spring Cloud release train compatible with the exact Boot 3 minor. - Import the Spring Cloud BOM and omit individual Spring Cloud dependency versions. - Prefer the reactive gateway unless the project deliberately uses the MVC variant. ## Route rules - Use stable route IDs and explicit predicates. - Strip untrusted forwarding, identity, and internal headers at the edge. - Add correlation headers only after removing client-supplied values. - Keep path rewriting and host changes visible in route configuration. - Set connect and response timeouts globally, with narrow route overrides. ## Security and resilience - Authenticate at the edge and authorize again in downstream services. - Relay tokens only to intended audiences. - Rate-limit by trusted identity or API key, not an unverified header. - Retry only idempotent operations and only before response commitment. - Use circuit breakers for failing dependencies; never hide sustained failure with unlimited retries. ## Testing and operations - Test predicates, filters, header removal, status mapping, and timeouts. - Use WireMock or a containerized upstream for integration tests. - Emit route ID, outcome, latency, and upstream metrics with bounded tags. ## Examples - See `examples/good-routes.yml` and `examples/bad-routes.yml`. ## Gotchas - Agent trusts `X-User-Id` from the public reques...

Details

Author
rrezartprebreza
Repository
rrezartprebreza/spring-boot-skills
Created
4 months ago
Last Updated
6 days ago
Language
Java
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

api-gateway-pattern

Use an API gateway for cross-cutting edge concerns without letting it absorb business logic, including the BFF variant. Use when fronting services with a gateway or untangling a bloated one.

5 Updated 5 days ago
Amey-Thakur
API & Backend Listed

spring-boot-microservices

Design, scaffold, and review modern Java Spring Boot microservices. Use this skill for ANY Spring Boot, Spring Cloud, or Java backend work — building or reviewing REST APIs in Java, Spring Data JPA / Hibernate (including N+1 and @Transactional issues), Spring Security (OAuth2, JWT), Spring Cloud Gateway, Resilience4j circuit breakers and timeouts, Kafka consumers and the transactional outbox, Micrometer / Actuator / OpenTelemetry observability, Testcontainers tests, caching with Redis, containerizing a Java service, Kubernetes probes, or zero-downtime deploys and database migrations. Trigger it whenever the user says things like "design a service", "scaffold a Spring Boot project", "add a gateway / config server / tracing / circuit breaker", "review my Spring Boot code", "is this service production-ready", "fix this N+1 or slow endpoint", "secure this API with JWT", "split this monolith", or "upgrade Spring Boot 2 to 3" — even when they never say the word "microservice". Targets the current GA generation (Spr

0 Updated 3 weeks ago
gauravs19
AI & Automation Listed

extreme-router-gateway-engine

AI Gateway routing, provider management, and core engine expertise for ExtremeRouter. Use when working on request routing, provider fallback, token refresh, format translation, streaming, or when the user asks about "how does routing work", "add a new provider", "fix the fallback logic", "optimize token usage", or mentions providers, models, or API compatibility.

17 Updated yesterday
rsalmn