feign调用异常:Method has too many Body parameters
解决方法:所有参数必须加上注解
@RequestMapping(value = "/spCommodity/commodityPage", method = RequestMethod.POST)
R goodsList(Page page, @RequestBody CommodityListQO commodityListQO);// 会报错
get请求:参数要加上注解@RequestParam
post请求:只能有一个@RequestBody,Page属于一个对象,可删除,其余的参数需要加上@RequestParam
feign调用的接口处可修改:
@PostMapping("/commodityPage")
public R goodsList(@RequestBody CommodityListQO commodityListQO){
Page<SpServiceCommodity> page = new Page<>();
// 页数
page.setCurrent(commodityListQO.getCurrent());
// 每页显示条数
page.setSize(commodityListQO.getSize());