Open desprez opened 1 year ago
This repository would probably be the best place for such migration recipes, similar to how we've included recipes for Spring Data migrations here as well. I imagine a new package org.openrewrite.java.spring.batch
should be enough to get started for now. Would you be willing to contribute migration recipes to kick this off?
I'll link the Spring Batch v5.0.0 Release and Migration Guide here for others as well.
Quickly looking through the migration guide there's:
readCount
, writeCount
, etc) in org.springframework.batch.core.StepExecution
and org.springframework.batch.core.StepContribution
have been changed from int to longskipCount
parameter in org.springframework.batch.core.step.skip.SkipPolicy#shouldSkip
has been changed from int
to long
. This is related to the previous point.startTime, endTime, createTime
and lastUpdated
in JobExecution
and StepExecution
was changed from java.util.Date
to java.time.LocalDateTime
.JacksonExecutionContextStringSerializer
, jackson-core
should be added to the classpath.BatchMetrics
class (which is intended for internal use only) has been moved from org.springframework.batch.core.metrics
to the org.springframework.batch.core.observability
package.Chunk
class was moved from the org.springframework.batch.core.step.item
package (spring-batch-core module) to the org.springframework.batch.item
package (spring-batch-infrastrucutre module)ScopeConfiguration
class has moved from org.springframework.batch.core.configuration.annotation
to org.springframework.batch.core.configuration.support
ItemWriter#write(List)
was changed to ItemWriter#write(Chunk)
items
in those method with items.getItems()
, such as in items.stream()
Hello, please take a look for this pr #280
Is there a plan for the spring-batch migration to be embedded in the spring-boot 3 migration somehow? Or is it expected that someone would run spring-boot-3.0 upgrade and then spring-batch-5.0 upgrade? I would assume the former since spring-boot governs batch version, right?
Anyhow, I'm asking because I work on a project that has some similarities to spring-boot and am wondering how to pattern upgrades. I promise not to derail this issue:)
The plan is certainly to make these recipes part of a regular Spring Boot migration; there's good work already done in
Springboot 3.x Spring-Boot-3.0-Release-Notes comes with new version 5.0 of Spring-batch and lots of deprecated stuff and changes. Do you plan to add recipes for this migration, here or in annoter repository ?