OK! This was easy... I have solved my problem. I made my own exception that throw: throw new CsvDataTypeMismatchException("Unable to find item type " + s); Please close the ticket . ;-)
Collecting own exception
Hi Scott, thanks for your answer. I have resolved the problem thanks to your advice. I have created a another class with fileds from both enities. Something like this, it might be useful for someone with similar issue :) @AllArgsConstructor @NoArgsConstructor @Data public class CSVItem { @CsvBindByPosition(position = 0, required = true) private String title; @CsvBindByPosition(position = 1, required = true) private String authorOrMagazineNumber; @CsvBindByPosition(position = 2, required = true) private...
CsvToBeanBuilder with multiple bean type