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 260 stars 40 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
80
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
4 days ago
Language
Java
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

model-gateway-routing

Model gateway / LLM router architecture: a control point in front of multiple models/providers for routing (cost/quality/latency), fallback, rate limiting, caching, observability, and governance. Architect-level, multi-provider. USE WHEN: designing an LLM gateway/router, "model router", "LLM gateway", "multi-provider", "fallback", "cost routing", "LiteLLM", "Envoy AI Gateway", semantic cache, central key/quota/observability for LLM calls. DO NOT USE FOR: single-engine serving (use `inference-serving-topology`); edge/cascade (use `hybrid-edge-cloud`); agent orchestration (use `agentic-architecture`).

33 Updated today
claude-dev-suite
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.

7 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 1 months ago
gauravs19