NONERetryer.DefaultErrorDecoder.DefaultFeignException을 발생시킵니다.SpringMvcContract이와 같은 기본값들은 필요에 따라 application.yml 또는 application.properties 파일을 통해 쉽게 오버라이드(재설정)할 수 있습니다. 예를 들어, 타임아웃이나 재시도 정책을 변경하고자 할 때 다음과 같이 설정할 수 있습니다:
feign:
client:
config:
default:
connectTimeout: 5000 # 5초
readTimeout: 10000 # 10초
loggerLevel: full # 로깅 레벨 변경
retryer:
period: 200 # 재시도 초기 지연 시간 변경
maxPeriod: 2000 # 최대 지연 시간 변경
maxAttempts: 3 # 최대 재시도 횟수 변경
Spring Cloud OpenFeign은 기본 Feign 클라이언트의 기본값을 그대로 사용하는 것이 아니라, Spring Cloud에서 제공하는 자동 구성에 의해 일부 기본값이 재정의
connectTimeout: 5000ms
readTimeout: 5000ms
loggerLevel: NONE
retryer: period=100ms, maxPeriod=1000ms, maxAttempts=5
errorDecoder: feign.codec.ErrorDecoder.Default
contract: Spring 환경에 맞게 SpringMvcContract