Use of microservices, Spring Cloud, and OpenFeign

Microservices – Spring Cloud – Use of OpenFeign

Introduction to OpenFeign

OpenFeign provides a declarative remoting interface .

What OpenFeign can do

The purpose is to simplify the writing of HTTP clients.

The use of Ribbon + RestTemplate was introduced in the notes before. Ribbon + RestTemplate encapsulates multiple http requests to form a templated call. However, in actual development, since there may be more than one call to the service dependency, often an interface is called by multiple places, so each microservice needs to be encapsulated. In view of this, Feign provides us with encapsulation operations on this basis, and Feign helps us define and implement the definition of dependent service interfaces. So simplifying our operation, we only need to create an interface and use

Guess you like

Origin blog.csdn.net/weixin_43713498/article/details/131340214