Spring Retry 实战 & 源码

前言

To make processing more robust and less prone to failure, it sometimes helps to automatically retry a failed operation, in case it might succeed on a subsequent attempt. Errors that are susceptible to this kind of treatment are transient in nature. For example, a remote call to a web service or an RMI service that fails because of a network glitch or a DeadLockLoserException in a database update may resolve itself after a short wait. To automate the retry of such operations, Spring Retry has the RetryOperations strategy.

日常开发中,我们无法避免在调用远程Web服务时候因为网络故障或数据库死锁等原因导致的调用失败,有时候这些故障会在短暂的等待后自行恢复,而为了自动重试这些操作,我们可以选择引入 Spring Retry .

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×