Accessing name of flat file from FlatFileItemReader LineMapper
问题 I have a need to be able to access the name of the flat file that the current line being read is from. We are porting an application and some processes that are currently in place require this information. Here is my current configuration: private FlatFileItemReader<Invoice> invoiceFlatFileItemReader() throws Exception { FlatFileItemReader<Invoice> reader = new FlatFileItemReader<>(); reader.setLinesToSkip(1); // header row reader.setLineMapper(new InvoiceLineMapper()); reader