Set spring.cloud.loadbalancer.retry.enabled to true by default

This commit is contained in:
Ryan Baxter
2017-03-30 16:30:40 -04:00
parent b896f22c3e
commit 8e34e0c5e4
2 changed files with 2 additions and 3 deletions

View File

@@ -362,8 +362,7 @@ for details of how the `RestTemplate` is set up.
==== Retrying Failed Requests
A load balanced `RestTemplate` can be configured to retry failed requests.
By default this logic is disabled, you can enable it by setting
`spring.cloud.loadbalancer.retry.enabled=true` and adding link:https://github.com/spring-projects/spring-retry[Spring Retry] to your application's classpath. The load balanced `RestTemplate` will
By default this logic is disabled, you can enable it by adding link:https://github.com/spring-projects/spring-retry[Spring Retry] to your application's classpath. The load balanced `RestTemplate` will
honor some of the Ribbon configuration values related to retrying failed requests.
The properties you can use are `client.ribbon.MaxAutoRetries`,
`client.ribbon.MaxAutoRetriesNextServer`, and `client.ribbon.OkToRetryOnAllOperations`.

View File

@@ -23,7 +23,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
*/
@ConfigurationProperties("spring.cloud.loadbalancer.retry")
public class LoadBalancerRetryProperties {
private boolean enabled = false;
private boolean enabled = true;
/**
* Returns true if the load balancer should retry failed requests.