Including Feign in the cloud application

First we will include the Netflix Feign dependency in the pom.xml file:

<parent> 
   <groupId>org.springframework.boot</groupId> 
   <artifactId>spring-boot-starter-parent</artifactId> 
   <version>2.0.2.RELEASE</version>
   <relativePath/> <!-- lookup parent from repository --> 
</parent> 
 
<properties> 
   ... 
   <spring-cloud.version>Finchley.M8</spring-cloud.version> 
</properties> 
 
<dependencies> 
   ... 
   <dependency> 
         <groupId>org.springframework.boot</groupId> 
         <artifactId>spring-boot-starter-web</artifactId> 
   </dependency> 
   <dependency> 
         <groupId>org.springframework.cloud</groupId> 
         <artifactId>spring-cloud-starter-netflix-eureka- client</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> ...

Get Mastering Spring Boot 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.