您的意思甚至比Tasklet更简单,例如,像这样的伪代码?
<!-- xml bean config --><bean id="deleteTableTaskletStep" > <property name="dataSource" ref="dataSource" /> <property name="sql" value="delete from ..." /></bean>// java prepublic class DeleteTableTasklet implements Tasklet {@Overridepublic RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { new JdbcTemplate(this.dataSource).executeQuery(this.sql) return RepeatStatus.FINISHED;}}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)