본문으로 건너뛰기
cccskills
무료GitHub에 공개

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(5)

  • SKILL.md4.2 KB
  • agents/openai.yaml204 B
  • examples/bad-routes.yml281 B
  • examples/good-routes.yml374 B
  • examples/good-webmvc-routes.yml284 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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.
<!-- 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.*
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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when adding Spring AI-specific model observations, token usage, latency, externally configured cost attribution, advisor telemetry, or protected prompt and completion logging. Use production-observability for general service metrics, health, logs, and OTLP setup.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rrezartprebreza/spring-boot-skills3192026년 10월 17일 업데이트

Use when versioning Spring MVC or WebFlux APIs in Spring Boot 4 / Spring Framework 7. Covers built-in mapping versions, request version resolution, defaults, supported versions, and deprecation headers.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rrezartprebreza/spring-boot-skills3192026년 10월 17일 업데이트

Use when versioning Spring MVC or WebFlux APIs in Spring Boot 3 / Spring Framework 6. Covers explicit URL, header, and media-type strategies, compatibility rules, and deprecation handling.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rrezartprebreza/spring-boot-skills3192026년 10월 17일 업데이트

Use when introducing or correcting grouped Spring Boot configuration, typed property binding, validation, profiles or secret injection. Do not rewrite unrelated single-value configuration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rrezartprebreza/spring-boot-skills3192026년 10월 17일 업데이트

Use when packaging a Spring Boot 3 application as an OCI image or GraalVM native executable. Covers buildpacks, layered images, JVM containers, AOT hints, probes, security, and verification.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rrezartprebreza/spring-boot-skills3192026년 10월 17일 업데이트

Use when packaging Spring Boot 4 as an OCI image, JVM container, AOT application, or GraalVM native executable. Covers buildpacks, layers, runtime hints, probes, security, and verification.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rrezartprebreza/spring-boot-skills3192026년 10월 17일 업데이트

rrezartprebreza의 스킬 모두 보기

이 스킬의 문제 신고