Import dependencies
Import openFeign dependencies in the required caller microservices module
Add the EnableFeignClients annotation to the start class
3. Create Client package and add interfaces of microservices of other modules that need to be called
The @feignClient annotation selects the microservice to be invoked. Parameter specifies the microservice name, which can be configured in the selected microservice YAML file
Methods written inside the interface are methods of the controller layer of the microservice being invoked. (Note: Request type and parameter type must be consistent)
Conclusion: Note that the startup class remembers to write comments, and the interface under the client package needs to select the micro service name of the called module. To test, call this method at the service layer.