OpenCSV convert Object with Nested bean to csv
问题 I am trying to map a bean to a CSV file with selected columns (not all columns) but the problem that my bean has other nested beans as attributes. Class Student { @CsvBindByName private String s_id; @CsvBindByName private String name; @CsvRecurse private List<Book> books; } Class Book { @CsvBindByName private String bookName; private String bookAuthor; } I want to map this object to csv file with below format s_id;name;bookName I have tried with below code but not getting bookName in csv