NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
~~~ package com.supergo.client; import com.supergo.http.HttpResult; import com.supergo.pojo.Item; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; //指定远程调用哪个微服务,eureka client注册的服务名 @FeignClient("supergo-manager") public interface ItemClient { //配置远程调用哪个接口(支持springMVC注解) @PostMapping("/item/query/{page}/{size}") HttpResult findPage(@RequestBody Item item, @PathVariable("page") int page, @PathVariable("size") int size); } ~~~