Home > Back-end >  @ feignClient annotations on the interface can be directly call the corresponding target service, so
@ feignClient annotations on the interface can be directly call the corresponding target service, so

Time:09-23

@ feignClient annotations on the interface can be directly call the corresponding target service, so, its implementation class has what effect

CodePudding user response:

Didn't understand what you want to express?

CodePudding user response:

Interface is defined, is the concrete implementation,
I don't know what the @ feignClient, but if he can realize functions, then the annotation should be contains the class information, such as the class name is able to obtain from the annotations,

CodePudding user response:

His principle is to call the eureka correspond to the name of the service, the default using HTTP calls, do not need to write the implementation class, even wrote also won't call

CodePudding user response:

That is what I see the project a lot of @ FeignClient annotations with the url (so we can directly call the remote service) but still wrote the implementation class, and there are business logic implementation class

CodePudding user response:

Interface with @ feignClient you have write an implementation class? If it is himself wrote that should be on the consumption side has its own business to deal with

CodePudding user response:

Interface is unable to work, and the interface of the @ FeignClient runtime is generated proxy class, by the proxy class to call the remote service, you said that the implementation of the class may be called only abnormal,

CodePudding user response:

The implementation class is returned an error data fusing mechanism

CodePudding user response:

7 building positive solutions, implementation classes are commonly used for fusing process;

CodePudding user response:

Service after the fuse, the default interface return data,

CodePudding user response:

The implementation class can be used for fusing, can refer to this article: https://blog.csdn.net/qq_33220089/article/details/103306567

CodePudding user response:

Feignclient implementation and the effect of resttemplate is consistent, just people don't like to use resttemplate splicing url, difference is not big, can do load balancing

CodePudding user response:

@ FeignClient valuehttps://bbs.csdn.net/topics/=(" ")
He just call the remote service, where the called service? Growers, producers come from? Not to write? Distributed know about the
  • Related