Spring Batch recipe for MigrateStepBuilderFactory
TEMPLATE_STOP tell me that something is missing by I don't know what
@Bean
Step myStep(JobRepository jobRepository) {
return new StepBuilder("myStep", jobRepository)/*__TEMPLATE_STOP__*/
./*__TEMPLATE_STOP__*/<String, String>chunk(completionPolicy())
.<String, String> chunk(completionPolicy())
.reader(reader())
.writer(writer())
.build();
}
Sorry I haven't had time to look at this yet, but I haven't forgotten
Hello, I'm interested in this recipe as SpringBatch4To5Migration doesn't contains this migration yet. Is it pending of anything? Thanks in advance.
Hello, I'm interested in this recipe as SpringBatch4To5Migration doesn't contains this migration yet. Is it pending of anything? Thanks in advance.
Hi @alexpm-14 ; I'd missed this comment as I wasn't subscribed to this thread yet; I've gone ahead and made some changes to adopt rewrite 8; that hasn't yet solved the template errors reported before, but at least one of the three tests now only has type issues, no longer any template issues, so there is some progress.
As for what's needed to complete this one: I don't exactly know; I'd have to dive in more, but don't currently have the time. You're welcome to explore if you're up for it; you can fork https://github.com/desprez/rewrite-spring/tree/main and see if that get's you closer. Feel free to tag me if you make a PR there or here, and I can try to work in a review.
@knutwannheden Perhaps you'd have an intuitive understanding of why we see template stop introduced here? A quick look would be appreciated if you're able to fit that in.
Reworked this a bit to ensure the JobRepository is now injected as a bean method argument before we use it in the new StepBuilder. Feel like I'm close but can't work out the final step.
Isolated the issue into this PR:
- https://github.com/openrewrite/rewrite/pull/4372