3
org.apache.commons.beanutils.BeanUtils :BeanUtils.populate의 재귀 버전이 있습니까?
BeanUtils.populate(Object bean, Map<String,? extends Object> properties);
Populate the JavaBeans properties of the specified bean, based on the specified name/value pairs.
BeanUtils.populate의 재귀 버전이 있습니까?
class Person {
String name;
Address address;
}
class Address {
String street;
int number
}
Person에서 전화를 걸면 주소에 기본 생성자가 있다고 가정하여 Person을 채 웁니다.
bean.address! = null 인 경우에만 작동합니다. 즉, BeanUtilsBean.populate()는 Address를 인스턴스화하지 않습니다. –
목록은 어떻습니까
? – arisalexis