There may be many cases of 400 errors in the Feign interface call. Let me talk about my 400 errors.
400 error reason:
When the Feign consumer calls the consumer interface, the incoming parameter is null, resulting in a 400 error.
Before the error is reported:
//Feign消费者
@RequestMapping("/test")
public void test(String testStr){
}
After handling the error:
//Feign消费者
@RequestMapping("/test")
public void test(String testStr){
testStr=testStr==null?"":testStr;
}