![](/img/trans.png)
[英]Changing the number of running steps by increasing the step pool size in Spring Batch
[英]Running a list of steps in the spring batch by passing a start step name and end step name in the application arguments
如果我們可以通過在應用程序參數中傳遞開始步驟和結束步驟的名稱來運行一組處理(多個步驟),那么在 spring 批處理中是否有方法。 我們的要求是我們有一個包含 11 個步驟的 spring 批處理,其中每個步驟都有不同的讀取器、處理器和寫入器。 將 step3 和 step8 作為參數傳遞,因此批處理會處理 step3 和 step8 之間的每個步驟。
知道這些步驟是在上下文 xml 文件中定義的。
感謝您的幫助。
對於這種特定要求,您可以使用JobExecutionDecider並使其根據應用程序參數決定執行或不執行哪個步驟。
您可以在此處的參考文檔中找到更多詳細信息和代碼示例: Programmatic Flow Decisions 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.