Skip to content

Tag: spring-batch

Spring Batch Wildcard ItemWriter

I have one dummy question. To explain my use-case, I have different type of DAOs; say Users, Beers… etc. I wanted to use one generic ItemWriter for all of them. I created a CommonComponentConfiguration where I defined; The writer class goes like this; So far everything is okay. Where things gets complic…

Access execution context from StaxWriterCallback

I’m implementing a job that will load data from a database and write the result to xml files. The xml files will have a header that is based on some attributes that are stored in the execution context. Therefore, I want to acces the execution context. I’ve done this in other beans in this job, but…

How to get ID fields from table using spring batch

I´m trying to get all fields from a table using spring batch. I got all fields, except the ID fields (primary key e foreign key) Below is my reader: Below is my writer: The others fields comes with success, but the ID fields like transactionId and deposit comes null. I think there is some kind of protection t…