nã "Internal Server Error", "trace": "org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://fornecedor/info/GO\": eureka; nested exception is java.net.UnknownHostException: eureka\r\n\tat org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:785)\r\n\tat org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)\r\n\ta
@Service public class CompraService { @Autowired private RestTemplate restTemplate; public void realizarCompra(CompraDto compraDto) {
ResponseEntity<infoFornecedorDto> exchange = restTemplate.exchange("http://fornecedor/info/" + compraDto.getEndereco().getEstado(),
HttpMethod.GET, null, infoFornecedorDto.class);
System.out.println(exchange.getBody().getEndereco());
}
}