you mean even more simple than a tasklet, e.g. like this pseudocode ?
<!-- xml bean config -->
<bean id="deleteTableTaskletStep" class="...">
<property name="dataSource" ref="dataSource" />
<property name="sql" value="delete from ..." />
</bean>
// java code
public class DeleteTableTasklet implements Tasklet {
@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
new JdbcTemplate(this.dataSource).executeQuery(this.sql)
return RepeatStatus.FINISHED;
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…