Java Feign调用时报错:[400 Bad Request] during [POST] to XXX

feign.FeignException$BadRequest: [400] during [POST] to [http…
Java Feign调用时报错:[400 Bad Request] during [POST] to XXX_第1张图片

主要原因是参数过大

可以采取

  1. 调大服务提供者的header参数(微服务较多 不太适用)
server:
  port: 8080
  max-http-header-size: 102400
  1. 改为requestBody调用服务(分批调用接口多次);

参考

  • https://bbs.huaweicloud.com/blogs/337923

你可能感兴趣的:(JAVA,SpringBoot,SpringCloud,工具箱,java,开发语言,spring,cloud,IDEA,FeignClient)