Skip to content
Advertisement

Tag: spring-batch

Spring Batch avoid launch Reader and Writer before tasklet

I’m working with spring batch and have a job with two steps the first step (tasklet) validation the header CSV and the second step reads an CSV file and Write to another CSV file like this: I used a FlatFileItemReader (in ClassitemReader) and a FlatFileItemWriter (in ClassiItemWriter), before reading CSV. I checked if the header of CSV file is correct

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 complicated is, I have seperate configuration classes for each

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 I can’t figure out

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 that not permit

How can I specify dynamically the ItemProcessor for a JSON Job?

I have different JSON files and need to read, process and write the containing JSON objects of a JSON array. The output format (more specific: the output class) is for all files the same. Lets call it OutputClass. Hence the item processor is something like ItemProcessor<X, OutPutClass>. Where X is the class of the specific JSON file. The difference between

Advertisement