feigin发送post请求。
1、服务方一定加上@RequestBody
@RequestMapping(value = "queryPerson" ) @ResponseBody public Person queryPerson(@RequestBody Person person){ String name = person.getName(); System.out.println("name==111111111111="+name); return person; }2、feign调用上一定要加 @Headers( "Content-Type: application/json")
@RequestLine("POST /queryPerson" ) @Headers("Content-Type: application/json") public Person queryPerson( Person person);