How do you implement declarative REST clients using Feign in Spring?
Define remote APIs as Spring interfaces with @FeignClient, configure timeouts and errors, and compare Feign with Spring's built-in @HttpExchange clients.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
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.
@QueryMapping connects a field of the GraphQL Query type to a Spring controller method, matched by name, so you can write resolvers without extra interfaces.
Add the GraphQL starter, write a schema, and map fields with @QueryMapping and @MutationMapping. Covers GraphiQL, batching, properties and tests.
Develop a GraphQL API with Spring Boot using Spring for GraphQL, covering schema, controllers, validation, error handling, testing and production tips.
Spring Cloud Sleuth is limited to Spring Boot 2. See how traces, spans and log correlation work and how to set up Micrometer Tracing with Zipkin on Spring Boot 3.
Spring Cloud Sleuth added trace and span IDs to Spring Boot 2 microservices. It is now replaced by Micrometer Tracing in Spring Boot 3 and later.
Centralized logging for microservices combines structured JSON logs, trace IDs, a log shipper and a searchable store such as Elasticsearch or Loki.
Query describes a search request and Criteria builds its field conditions. See CriteriaQuery, NativeQuery and ElasticsearchOperations in a complete example.
The @Document annotation maps a Java class to an Elasticsearch index. Learn its attributes, how it works with @Field and @Setting, and when indices get created.
Set up Spring Data Elasticsearch in Spring Boot 3, map a document, and run create, read, update, delete and search with ElasticsearchRepository or ElasticsearchOperations.
Add spring-boot-starter-data-elasticsearch and set spring.elasticsearch.uris plus credentials. Covers TLS, ElasticsearchClient, repositories and custom Java configuration.