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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.