Does spring batch support executing a sql scripts as part of a tasklet? Below are the sequence of steps that I'm planning to develop with spring batch.
For step 2 and 4 I need to run bunch of sql statements in sequence. How can I accomplish running a sql script?
While I don't believe Spring Batch specifically supports what you're asking for, you could take a look at ScriptUtils to see if it provides the behavior you're looking for.
If not, depending on the complexity of your SQL there is the option of using JdbcTemplate
directly within a Tasklet
and creating a series of Tasklets
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.