读书人

java.lang.IllegalArgumentException:

发布时间: 2012-12-19 14:13:14 作者: rapoo

java.lang.IllegalArgumentException: argument type mismatch
两个类:
user{
Date birthday;
}

FormBean{
String birthday;
}

方法中:
FormBean fb = new FormBean();
fb.setBirthday("2012-11-12");

User user = new User();
ConvertUtils.register(new DateLocaleConverter(), Date.class);
BeanUtils.copyProperties(user, ufb);

最后一行执行出错,异常如题目。
[最优解释]
null
[其他解释]
BeanUtils.copyProperties(user, ufb);参数类型不匹配,ufb哪里来的

读书人网 >J2EE开发

热点推荐