Galera estou tentando realizar uma consulta em uma API de previsao de tempo porem sempre que vou realizar a consulta me da essa exceção
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: URI is not absolute] with root cause
Minha controle a onde esta com o RestTemplate esta assim
RestTemplate restTemplate = new RestTemplate();
StringBuilder stringBuilder = new StringBuilder();
String urlFinal = stringBuilder.append(url).append(cidade).append("&appid=").append(apiKey).toString();
ResponseEntity<WeatherResponseObject> entity = restTemplate.getForEntity(urlFinal, WeatherResponseObject.class);
System.out.println(entity.getBody());
return entity.getBody();
E por ultimo o retorno do meu WeatherResponseObject
public List<BodyWeather> list;