Last active
July 16, 2022 14:51
-
-
Save atesibrahim/48f0aa48cc914a19b18636e210064852 to your computer and use it in GitHub Desktop.
Feign Client Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BookClientFeignConfiguration { | |
private static final int CONNECT_TIMEOUT_MILLIS = 5000; | |
private static final int READ_TIMEOUT_MILLIS = 5000; | |
@Bean | |
public Contract useBookClientFeignAnnotations() { | |
return new SpringMvcContract(); | |
} | |
@Bean | |
public BookClientErrorDecoder bookClientErrorDecoder() { | |
return new BookClientErrorDecoder(); | |
} | |
@Bean | |
public Request.Options options() { | |
return new Request.Options(CONNECT_TIMEOUT_MILLIS, READ_TIMEOUT_MILLIS); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment