import org.apache.commons.beanutils.BeanUtils;
public class Person {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static void main(String[] args) {
try{
Person person = new Person();
person.setName("zhangsan");
Person p = (Person)BeanUtils.cloneBean(person);
System.out.println("clone:"+p.getName());
}catch (Exception e) {
}
}
}