嘗試從REST服務獲取實體。我的代碼是這樣的:getEntity與GenericType
我想在這樣一個對象發送:new GenericType<List<MyObject>>() {}
到這樣的梅索德:
public static Object callRestWithUrl(String url, Class<?> responseObject)
throws MetaServiceException {
ClientResponse response = RESTConnectionUtils.callMetaService(url);
result = response.getEntity(responseObject);
.....
但它能夠評估在運行時列表中而不GenericType和拋出異常。