springcloud rest接口接收List的正确写法

list中元素为基本类型
必须是post,如果参数加@RequestParam,必须指定参数名
@ApiOperation("应付获取发货单价2")
@PostMapping("/ap/queryDeliveryUnitPriceMap2")
RemoteResult> queryDeliveryUnitPriceMap2(@RequestParam("data") List list){
   return RemoteResult.success(receiptBizService.queryDeliveryUnitPriceMap(list));
}

@ApiOperation("应付获取发货单价3")
@PostMapping("/ap/queryDeliveryUnitPriceMap3")
RemoteResult> queryDeliveryUnitPriceMap3(@RequestBody List list){
   return RemoteResult.success(receiptBizService.queryDeliveryUnitPriceMap(list));
}

你可能感兴趣的:(springcloud,feignclient)