...
Code Block | ||
---|---|---|
| ||
@Import(FeignConfiguration.class) class GithubClientConfiguration { @Bean RequestInterceptor basicAuthInterceptor(String username, String password) { [1] return FeignHelper.basicAuthInterceptor(username, password); } @Bean FeignBuilderCustomizer feignBuilderCustomizer() { [2] return FeignHelper.customizeRequestOptions() .withConnectTimeout(Duration.ofSeconds(60)) .withReadTimeout(Duration.ofSeconds(5)) .build(); } @Bean ErrorDecoder errorDecoder() { [3] return new GenericJsonErrorDecoder("GithubClient"); } } |
...