1
Good afternoon I have a small problem connecting to another API with the feign client, what happens that testing locally works, when I go to production that it simply gives a notfound.
Code of Feign Client Service
@FeignClient("service-buscar-indice")
public interface BuscarIndiceFinanceiroService {
public static final String HTTP_HEADER_AUTHORIZATION= "Authorization";
static final String HTTP_HEADER_APPLICATION = "Application";
@GetMapping(value = "", consumes = MediaType.APPLICATION_JSON_VALUE)
public String buscarIndice(
@RequestHeader(name = HTTP_HEADER_AUTHORIZATION) String authorizationHeaderValue,
@RequestHeader(name = HTTP_HEADER_APPLICATION) String application,
@RequestParam(name = "codigo", required = true) String codigo);
}
Controller code of the other api (yes the feign is already enabled and etc... locally works, that’s the problem kk)
@RestController
@RequestMapping(path = "")
public class BuscarIndiceController {
@Autowired
private BuscarIndiceService buscarIndiceService;
@GetMapping(path="")
public String buscarIndiceFinanceiro(@RequestParam(name="codigo",required=true) String codigo){
return buscarIndiceService.buscarIndicePorCodigo(codigo);
}
}