I just want to set the dynamic return type of the object returned by postForObject
. This is what I have tried, but its not working.
Object[] decryptedDataArray = restTemplate.postForObject(url, dataToBeDecryptedList.toArray(), Object[].class);
if(decryptedDataArray instanceof DecryptedData[]){
if (decryptedDataArray != null && decryptedDataArray.length > 0) {
fieldDataMap = setDecryptedData(fieldDataMap, (DecryptedData[]) decryptedDataArray);
}
}
Aucun commentaire:
Enregistrer un commentaire