How to create a generic FlatFileItemReader to read CSV files with different headers?
问题 I'm creating a job that will read and process different .csv files based on an input parameter. There are 3 different types of .csv files with different headers. I want to map each line of a file to a POJO using a generic FlatFileItemReader . Each type of file will have its own POJO implementation, and all "File Specific POJOs" are subclassed from an abstract GenericFilePOJO . A tasklet will first read the input parameter to decide which file type needs to be read, and construct a