0
当我使用netflix客户端发送POST请求时,json属性在到达服务使用者时为空。netflix feign客户端 - RequestMethod.POST提交空json对象服务
下面是我的界面
@FeignClient(name = "NLPService", configuration = FooConfiguration.class)
public interface NLPServiceConsumer extends TempInterface {
}
public interface TempInterface {
@RequestMapping("/greeting")
String greeting();
@RequestMapping(method = RequestMethod.POST,value="/nlp",
consumes="application/json",produces="application/json")
NLPResponse identifyTags(NLPInputToBeTransformed nlpInputToBeTransformed);
@RequestMapping(method = RequestMethod.GET,value="/nlpGetMethod",
produces="application/json")
NLPResponse identifyTagsTest();
}
方法identifyTagsTest工作,我能够成功地得到响应。 这种方法是一个没有输入的GET方法
当我尝试一个POST方法,传递一个对象作为参数,在终点服务实现中,对象属性为null。
有没有人遇到过这样的问题?我的配置有错吗?