feign.FeignException$BadRequest: status 400 reading MBaseClient#hxDelete(Integer id)

报错:
feign.FeignException$BadRequest: status 400 reading MBaseClient#deleteBy(Integer id)

原因:调用时漏掉了头信息

调用方:

@PostMapping(value = “/xx-base-haihai/deleteBy”)
BaseApiResponse delete(@RequestParam(“id”)Integer id);

被调用方:

@ApiOperation("删除")
@PostMapping("deleteBy")
public BaseApiResponse<Integer> delete(@RequestParam("id") Integer pk,
                                       @RequestHeader("customer-name")String customerName,
                                       @RequestHeader("customer-id")String customerId,
                                       @RequestHeader("product-code")String productCode) {
  
}
引用\[1\]中的错误信息显示,出现了feign.FeignException$NotFound: status 404的错误。引用\[2\]中提到,在远程调用时尽量不要使用路径传参,否则可能会出现FeignException$NotFound: status 404的错误。引用\[3\]中的错误信息也显示了类似的错误,即feign.FeignException$NotFound: \[404 Not Found\]。根据这些信息,可以得出结论,feign.FeignException$NotFound: status 404是表示远程接口调用时发生了404错误,即请求的资源未找到。 #### 引用[.reference_title] - *1* [feign.FeignException$NotFound: status 404 reading](https://blog.csdn.net/weixin_59401183/article/details/128217318)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [Feign feign.FeignException$NotFound: status 404 reading](https://blog.csdn.net/qq_51886300/article/details/127881431)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [feign.FeignException$NotFound: [404 Not Found] Gateway层级错误【已解决】](https://blog.csdn.net/tomorrow9813/article/details/131599996)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值