重試

為了使處理更健壯、更不容易失敗,有時自動重試失敗的操作會有所幫助,以防它在後續嘗試中可能成功。容易間歇性失敗的錯誤通常是暫時性的。例如,由於網路故障導致對 Web 服務的遠端呼叫失敗,或者資料庫更新中出現 DeadlockLoserDataAccessException

從 v6.0 開始,Spring Batch 使用 Spring Retry 在框架內自動化重試操作,現在基於 Spring Framework 7.0 提供的 核心重試功能

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