Android REST客户端在restTemplate.getForObject()上停止

时间:2017-10-25 01:56:01

标签: java android rest

我的代码:

info.local = locais.id = locais.local
2, 3 = 2, 3 = Portugal, Suiça

info.cores = cores.id = cores.cor
1 = 1 = Azul

我的应用程序在执行.getForObject()方法时停止。有我的货币类:

final String url = "http://api.fixer.io/latest?base=USD";
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());
Currency currency = restTemplate.getForObject(url, Currency.class);
return currency;

有什么问题?

0 个答案:

没有答案