是否可以在dropwizard中使用spring-retry?或者,出于这个原因,dropwizard中有没有像spring-retry这样的东西呢?
发布于 2017-02-05 21:55:41
不确定spring重试的功能,但是对于客户端重试,您可以为HttpClient配置retries
httpClient:
timeout: 500ms
retries: 3重试失败请求的次数。只有在抛出InterruptedIOException、UnknownHostException、ConnectException或SSLException以外的异常时,才会重试请求。
请参阅Dropwizard documenation
发布于 2017-02-06 22:23:58
来自Spring Batch - Reference Documentation,9. Retry
从2.2.0版本的Spring Batch中删除了重试功能。它现在是一个新库Spring Retry的一部分。
Spring Retry可以独立于其他Spring项目使用。
例如,在Maven项目中,您可以简单地在POM中添加以下内容:
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
<version>1.1.5.RELEASE</version>
</dependency>https://stackoverflow.com/questions/41923671
复制相似问题