What Is the @EnableGateway Annotation in Spring Cloud?
There is no @EnableGateway annotation in Spring Cloud Gateway. Add the starter and define routes, predicates and filters in YAML or the Java DSL.
2,886 posts about Java: questions with answers, tutorials and articles, newest first.
There is no @EnableGateway annotation in Spring Cloud Gateway. Add the starter and define routes, predicates and filters in YAML or the Java DSL.
A GatewayFilter runs on specific routes to change requests and responses; GlobalFilter runs on all. Learn built-in filters, custom filters and ordering.
Configure Spring Cloud Gateway rate limiting with RequestRateLimiter, RedisRateLimiter and a KeyResolver, in YAML or Java.
In Feign, @RequestMapping describes the outgoing request: verb, path, headers and media types. Learn usage, pitfalls and the modern alternatives.
Use a custom ErrorDecoder, bounded retries and a circuit breaker with a FallbackFactory to handle Feign client errors in Spring Cloud OpenFeign.
The @FeignClient name is the service ID for discovery and the key for per-client config. See how it works with url, path and contextId.
Add a fallback or fallbackFactory to a Spring Cloud OpenFeign client using Resilience4j, since Hystrix has been removed, and tune timeouts and the circuit breaker.
The circuit breaker pattern fails fast when a dependency is unhealthy. See the three states, a Resilience4j example and how it fits with retries and timeouts.
Set connect-timeout and read-timeout globally or per client with Spring Cloud OpenFeign. Covers defaults, Java config, retries and circuit breaker timeouts.
spring-cloud-starter-openfeign turns annotated Java interfaces into HTTP clients wired into load balancing and circuit breakers. See setup, config and alternatives.
Define remote APIs as Spring interfaces with @FeignClient, configure timeouts and errors, and compare Feign with Spring's built-in @HttpExchange clients.
@EnableFeignClients makes Spring Cloud OpenFeign scan for @FeignClient interfaces and create client beans. Learn setup, timeouts, fallbacks and alternatives.
Run Zipkin on port 9411 with Docker, then connect Spring Boot 3 services through Micrometer Tracing instead of the retired Sleuth.
@SubscriptionMapping binds a method to a GraphQL subscription field and streams results with a Flux. See schema, WebSocket setup and a working example.
Add real-time GraphQL subscriptions to Spring Boot using @SubscriptionMapping, Reactor Flux and WebSocket, with a working chat example.
GraphQLError is graphql-java's error type. Learn how Spring for GraphQL maps exceptions to it with GraphqlErrorBuilder and @GraphQlExceptionHandler.
Map exceptions to GraphQL errors in Spring for GraphQL with @GraphQlExceptionHandler or a resolver, add error codes and understand why status stays 200.
@MutationMapping maps a controller method to a GraphQL mutation field. Learn schema setup, argument binding, return types, validation and testing.
@SchemaMapping connects a Spring controller method to a GraphQL field. See how it resolves nested data, how it relates to @QueryMapping, and how to avoid N+1 queries.
Add the GraphQL starter, define a schema file, and implement queries with @QueryMapping controllers, then try them in GraphiQL and test them with GraphQlTester.