public interface ItemsClient {
@RequestLine("POST /items")
public Map<String, Object> post(Map<String, Object> item);
}
Then
ItemsClient itemsClient = Feign.builder().decoder(new GsonDecoder()).encoder(new GsonEncoder()).target(ItemsClient.class, ROOT_URI);
Map<String, Object> myNewItemWithId = itemsClient.post(myNewItem);
The server send a response with a body like :
{
"id" : 108171343002018,
"name" : "myNewItem among many and many !"
}
But then the value of myNewItemWithId.get("id"); is 2147483647, the maximum value of Integer.
Is there a way to tell GsonDecoder to decode the integer numbers into Long ?