Using Feign Client for Declarative REST Calls in Spring Cloud

Feign is a Java-to-HTTP client binder that simplifies the process of making HTTP API calls. Inspired by Retrofix, JAXRS-2.0, and WebSocket technologies, Feign provides a declarative API interface style, making it easier to bind Java HTTP clients to your application logic. Source code: https://github.com/OpenFeign/feign This chapter builds upon ...

Posted on Thu, 05 Nov 2026 16:45:42 +0000 by phpSensei

Implementing Service Consumers with Feign and Load Balancing with Ribbon in Spring Cloud

Feign Service Consumer Implementation Feign is a declarative web service client that simplifies HTTP API development. It uses annotations to define service interfaces and integrates seamlessly with Spring MVC. Environment Setup Required Components: Java 8+ Spring Boot 2.1.1+ Spring Cloud Finchley+ Dependencies: <dependencies> <de ...

Posted on Tue, 06 Oct 2026 16:53:46 +0000 by thepeccavi

Inter-Project Communication in Java Web Applications

This article focuses on application-level implementation without delving into underlying principles. The project framework is already set up, using Spring Boot 1.5, MyBatis for database operations, Oracle as the database, and Vue with Node.js for the frontend. Due to specific requirements, communication between multiple projects is necessary. O ...

Posted on Thu, 01 Oct 2026 16:14:49 +0000 by robindean

Spring Boot Microservices: Service Management with Feign Client

Introduction Feign simplifies REST client development by abstracting away the underlying HTTP communication details. Instead of manually constructing URLs, handling parameter concatenation, and managing HTTP requests, Feign allows developers to define service calls as simple interface methods that resemble Spring MVC controller endpoints. This ...

Posted on Sat, 23 May 2026 18:57:00 +0000 by Ohio Guy

OpenFeign Source Code Deep Dive: Architecture and Request Processing Pipeline

Core Architecture Overview OpenFeign leverages Spring's declarative HTTP client capabilities through a sophisticated bean registration and proxy generation mechanism. At its foundation, the framework utilizes Spring's FactoryBean pattern to create dynamic proxies for Feign client interfaces. When scanning for interfaces annotated with @FeignCli ...

Posted on Tue, 19 May 2026 00:45:02 +0000 by marcel

Dynamically Modifying @FeignClient Path at Runtime Using BeanFactoryPostProcessor

This solution covers both Spring Boot 2.x and 3.x implementations. Problem Description A common requirement arises where each API interface carries an interfacePath defined in a custom annotation on the interface itself. For instance: @FeignClient(value = "x-module") public interface XXXService extends XApi { } @XXXMapping("/mem ...

Posted on Wed, 13 May 2026 10:14:33 +0000 by AlanG

Service Discovery and Inter-Service Communication in Spring Cloud with Eureka

Using Netflix Feign Client for Service Calls First, add the spring-cloud-starter-openfeign dependency to your project: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" ...

Posted on Mon, 11 May 2026 13:30:21 +0000 by thoand

Implementing Feign Circuit Breaker Fallback with Sentinel in Spring Cloud Alibaba

Overview Without circuit breaking, invoking a downstream service that is offline results in prolonged HTTP timeouts or immediate exceptions—often leading to cascading failures across dependent serviecs. This article demonstrates how to integrate Sentinel with OpenFeign to provide graceful degradation and circuit-breaking behavior for remote cal ...

Posted on Sun, 10 May 2026 15:57:53 +0000 by hno