重试

为了使处理更健壮、更不容易失败,有时自动重试失败的操作会有所帮助,以防它在后续尝试中可能成功。容易间歇性失败的错误通常是暂时性的。例如,由于网络故障导致对 Web 服务的远程调用失败,或者数据库更新中出现 DeadlockLoserDataAccessException

从 v6.0 开始,Spring Batch 使用 Spring Retry 在框架内自动化重试操作,现在基于 Spring Framework 7.0 提供的 核心重试功能

© . This site is unofficial and not affiliated with VMware.