try { BeanUtils.copyProperties(destObj, srcObj); } catch (IllegalAccessException e) { logger.error("IllegalAccessException occurred: " + e.getMessage()); } catch (InvocationTargetException e) { logger.error("InvocationTargetException occurred: " + e.getMessage()); } catch (NoSuchMethodException e) { logger.error("NoSuchMethodException occurred: " + e.getMessage()); } int destHashCode = destObj.hashCode(); BeanUtils.copyProperties(destObj, srcObj); int newDestHashCode = destObj.hashCode(); if (destHashCode != newDestHashCode) { } else { } ConvertUtils.register(new DateConverter(), Date.class); BeanUtilsBean beanUtilsBean = new BeanUtilsBean(new ConvertUtilsBean()); beanUtilsBean.copyProperties(destObj, srcObj); ConvertUtils.register(new IntegerConverter(null), Integer.class); BeanUtils.copyProperties(destObj, srcObj);


上一篇:
下一篇:
切换中文