Serge
Serge

Reputation: 626

Multiple sql statements in spring batch writer

I want to know if it is possible to execute two statements in a spring batch writer? I DO NOT want to use multiple writers.

Upvotes: 0

Views: 1135

Answers (1)

Evgeni Dimitrov
Evgeni Dimitrov

Reputation: 22506

Yes, you can...

public class CustomItemWriter<T> implements ItemWriter<T> {

    public void write(List<? extends T> items) throws Exception {
       //Execute as many statements as you want 
    }

}

Upvotes: 1

Related Questions