dto オブジェクト:
public class DTOUser implements UserDetails {
/**
*
*/
private static final long serialVersionUID = -769714837633005963L;
private Long id;
private String account;
private String password;
private String statusStr;
private UserStatus status;
private int systemAdmin;
private long operator;
private String operateTime;
private String name;
private String company;
private String email;
private String telephone;
private List<DTOAuthority> dtoAuthorities = new ArrayList<DTOAuthority>();
private List<DTOAgreement> dtoAgreements = new ArrayList<DTOAgreement>();}
実在物:
@Entity
@Table(name="adt_user")
public class User {
private long id;
private String account;
private String password;
private String statusStr;
private UserStatus status;
private int systemAdmin;
private long operator;
private String operateTime;
private String name;
private String company;
private String email;
private String telephone;
private Set<Authority> authorities = new HashSet<Authority>();
private Set<Agreement> agreements = new HashSet<Agreement>();}
私は次のメソッドを使用して値をエンティティにコピーしますが、例外があります:
java.lang.IllegalArgumentException: com.hna.adt.orm.User.setAuthorities を呼び出せません - 引数の型が一致しません
どうしたの ?
BeanUtils.copyProperties(entity, value);