Commit a91815aa by Ryan Baxter

Made Retryer a bean.

parent 14dd2d23
......@@ -103,10 +103,16 @@ public class FeignClientsConfiguration {
}
@Bean
@ConditionalOnMissingBean
public Retryer feignRetryer() {
return Retryer.NEVER_RETRY;
}
@Bean
@Scope("prototype")
@ConditionalOnMissingBean
public Feign.Builder feignBuilder() {
return Feign.builder().retryer(Retryer.NEVER_RETRY);
public Feign.Builder feignBuilder(Retryer retryer) {
return Feign.builder().retryer(retryer);
}
@Bean
......
......@@ -108,7 +108,7 @@ public class FeignClientOverrideDefaultsTests {
@Test
public void overrideRetryer() {
assertNull(this.context.getInstance("foo", Retryer.class));
assertEquals(Retryer.NEVER_RETRY, this.context.getInstance("foo", Retryer.class));
Retryer.Default.class.cast(this.context.getInstance("bar", Retryer.class));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment