Would it be possible to change "column" from String to String[] in the CsvBindByName annotation?
During processing first matching column name from the list would bind to POJO field.
Discussion
Without breaking backward compatibility, which we will not consider until 6.0? No. I don't think I see a way of doing this.
I would be interested in your use case, though. It's an odd request, and a bit intriguing.
To be honest I don't think it would break backward compatibility as you can define String[] as
For my use case I gather data from multiple CSV files with different header names. Currently I have to map them into multiple beans. The data has the same bussines meaning under different headers depending on source.
Last edit: Mark Green 2020-10-25
I would use the first one for simplicity.
Another approach can be with repeating annotations(since Java 8 is minimum supported version) and adding something like profiles/strategies: