java - Is there a way to map a Set to a List with BeanUtils.copyProperties? -
I'm using BeanUtils.copyProperties to convert two beans Beanutils. Copproperties (organization, deto organization); I have to do a list in one bean and set one to in the other. First Been: Public Category Form {Private Set & lt; Organization & gt; Organization; } Second bean: Public final category DTOForm {Private list & lt; DTOOrganization & gt; Organization; } The result is an exception as described here: Is it possible to optimize BeanUtils.copyProperties ? You can solve it by using custom converters. The main idea is that set ListEntity, which has list / Code> Property (as far as I do not ignore the setters and gates): Public Class List {Private list & lt; Integer & gt; Col = new arreelist & lt; & Gt; (); Public listing & lt; Integer & gt; GetCol () {Return Colonel; } Public Zero Set Call (list & gt; integer & gt; col) {this.col = col; Set}} SetEntity, which has set propert...