在我的项目中,我使用 Spring 批处理并使用 FlatFileItemReader/FieldSetMapper 读取文件。一些输入文件有问题。这些行被剪切/格式错误,很少有记录。
假设输入文件有 4 列。几列没有正确形成。谁能帮我解决这个问题?(如果需要,我可以解释更多)
File.csv
"id","name","age","salary"
"1","user1","28","1000"
"2","user2","27","2000"
"3","user3","26
","3000"
"4","user4","25","
4000"
"5","
user5","24","5000"
"6","user6","23","6000"
"7","user7","22","7000"
"8","user8","21","8000"