I'm using spring-batch
to import large datasets to a database. During preparation of the db objects in ItemProcessor
, I want to set a field filesHash
so that I later know from which file the imported row came from.
Question: how can I optain the current resources filename in ItemProcessor
?
I'm using FlatFileItemReader
to read the files content line by line. Unfortunately it has a setResource(resource)
method, but provides not getter?
The linked question does not answer this!