netflix feign 客户端 - RequestMethod.POST 向服务提交空 json 对象

netflix feign client - RequestMethod.POST submits empty json object to service

当我使用 netflix 客户端发送 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 方法时,传递一个对象作为参数,在端点服务实现中,对象属性为空。

有人遇到过这样的问题吗?我的配置有什么错误吗?

问题不在假客户端。它在服务实现中

在这个问题上花了将近一天的时间。 RestController 还必须指定 @RequestBody(除了共享接口)