<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Feign on Devops Monk</title><link>https://devops-monk.com/tags/feign/</link><description>Recent content in Feign on Devops Monk</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 03 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://devops-monk.com/tags/feign/index.xml" rel="self" type="application/rss+xml"/><item><title>Inter-Service Communication with OpenFeign and RestClient</title><link>https://devops-monk.com/tutorials/spring-boot/spring-cloud-feign-restclient/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/spring-boot/spring-cloud-feign-restclient/</guid><description>Services call each other over HTTP. You can use raw RestClient with a URL, or you can use OpenFeign — a declarative HTTP client that turns an interface into a fully functional HTTP client. This article covers both.
OpenFeign: Declarative HTTP Client &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.springframework.cloud&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;spring-cloud-starter-openfeign&amp;lt;/artifactId&amp;gt; &amp;lt;/dependency&amp;gt; @SpringBootApplication @EnableFeignClients public class OrderServiceApplication { } Defining a Feign Client @FeignClient( name = &amp;#34;inventory-service&amp;#34;, // service name — resolved via Eureka path = &amp;#34;/api/inventory&amp;#34; ) public interface InventoryClient { @GetMapping(&amp;#34;/products/{productId}/availability&amp;#34;) InventoryResponse checkAvailability( @PathVariable UUID productId, @RequestParam int quantity ); @PostMapping(&amp;#34;/reservations&amp;#34;) ReservationResponse reserve(@RequestBody ReservationRequest request); @DeleteMapping(&amp;#34;/reservations/{reservationId}&amp;#34;) void cancelReservation(@PathVariable UUID reservationId); @GetMapping(&amp;#34;/products&amp;#34;) Page&amp;lt;ProductResponse&amp;gt; findProducts( @RequestParam String category, @SpringQueryMap Pageable pageable // Pageable as query params ); } Using it — just inject and call:</description></item></channel></rss>