0

Wenn ich eine POST-Anfrage mit Netflix-Client senden, sind die JSON-Eigenschaften leer, wenn es den Service-Consumer trifft.Netflix Schein Client - RequestMethod.POST sendet leere JSON-Objekt zu Service

Unten ist mein Interface

@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(); 


} 

Methode identifyTagsTest funktioniert und ich bin in der Lage, die Antwort erfolgreich zu bekommen. Diese Methode ist eine GET-Methode ohne Eingabe

Wenn ich eine POST-Methode versuche, ein Objekt als Parameter übergeben, sind die Objektattribute bei der Endpunkt-Service-Implementierung null.

Hat jemand mit einem solchen Problem konfrontiert? Gibt es einen Fehler in meiner Konfiguration?

Antwort

Verwandte Themen