我有一个现有的弹簧批Step
,并希望用Async
处理器+编写器重构它。
StepBuilderFactory steps;
steps.get("test").chunk(1000)
.reader(new FlatFileItemReader<String>())
.processor(new AsyncItemProcessor<String, String>())
.writer(new AsyncItemWriter<String>())
.build();
这不起作用并抱怨处理器:
The method processor(ItemProcessor<? super Object,? extends Object>) in the type SimpleStepBuilder<Object,Object> is not applicable for the arguments (AsyncItemProcessor<String,String>)
。
如何使用异步构建步骤?