Spring Batch 6.0.2 現已發佈,包含多項改進、錯誤修復及文檔更新。具體更新內容如下:
New features
-
為 JobParametersConverter 添加 ZonedDateTime 和 OffsetDateTime 支持 #5178
Bug fixes
- 從
CommandLineJobRunner遷移至CommandLineJobOperator時 v5 與 v6 的兼容性問題 #5227 - MongoStepExecutionDao.countStepExecutions() 忽略 stepName 參數#5220
- 由於 graceful shutdown 過程中的競爭條件,導致 OptimisticLockingFailureException 異常 #5217
- ChunkOrientedStep#doExecute 更新了塊事務邊界之外的 StepExecution #5199
- Jackson2ExecutionContextStringSerializer 無法序列化 JobStep 中的作業參數 #5191
- 在並行塊處理期間,StepContribution 計數器不是線程安全的 #5188
- 在多線程 ChunkOrientedStep 中使用
@StepScopeItemProcessor 時出現 ScopeNotActiveException 異常 #5183 - ChunkOrientedStep 即使在數據塊執行失敗的情況下也會更新 ExecutionContext,導致重啓時數據丟失#5182
- 當
@SpringBatchTest激活時,MetaDataInstanceFactory 的默認值會導致 StepScopeTestUtils 中 StepContext 衝突 #5181 - DB2LUW 數據庫遷移到 spring-batch 6.x 時出現錯誤 #5166
- 自 Spring Batch 5.2.3 起,JobRepositoryTestUtils.removeJobExecutions() 中出現 OptimisticLockingFailureException 異常 #5161
- AbstractPaginatedDataItemReader 中的 jumpToItem(int itemLastIndex) 實現無法正確處理重啓行為 #5136
- AbstractCursorItemReader#doClose 中資源清理順序錯誤導致行為不一致 #5109
- 使用 asyncTaskExecutor 和 jobOperator.start() 啓動作業時出現間歇性 OptimisticLockingFailureException 異常 #5106
- 將 StaxEventItemWriter 與 MultiResourceItemWriter 結合使用時出現 ClosedChannelException 異常 #5098
- 並行作業執行期間 MongoSequenceIncrementer 中的寫入衝突 #4960
Enhancements
- 使用 Spring Framework 的 CollectionUtils 創建 HashSet/HashMap #5175
- 移除 StoredProcedureItemReader 中的冗餘斷言#5119
Documentation
- 修復 whatsnew.adoc 和集成測試中的拼寫錯誤#5207
- 明確 v6 版本中 ChunkListener 的變更#5226
- v6 版本中關於併發步驟的文檔有誤#5228
- 正確的 JobOperatorFactoryBean 示例代碼 #5103
Tasks
- 更新問題報告指南中的項目模板 #5212
Dependency Upgrades
- Spring Framework: 7.0.3
- Spring Integration: 7.0.2
- Spring AMQP: 4.0.2
- Spring Kafka: 4.0.2
- Spring Data: 4.0.2
- Micrometer: 1.16.2
更新説明:https://github.com/spring-projects/spring-batch/releases/tag/v6.0.2