以前的筆記主要涉及前端,以後會以這個Web知識體系作學習
html
Java
中對象屬性拷貝的方法和性能對比①手動拷貝(set)
②動態代理
cglib版本:'net.sf.cglib.beans.BeanCopier.copy(Object from, Object to, Converter converter)'
③反射機制
Spring版本:'org.springframework.beans.BeanUtils.copyProperties(Object source, Object target) '
Apache版本:'org.apache.commons.beanutils.PropertyUtils.copyProperties(Object dest, Object orig) '
'org.apache.commons.beanutils.BeanUtils.copyProperties(Object dest, Object orig)'
④dozer版本(xml配置映射)
'org.dozer.DozerBeanMapper.map(Object source, Class<T> destinationClass)'
複製代碼
拷貝對象屬性時間複雜度
T(n)
manualCopy > cglibCopy > springBeanUtils > apachePropertyUtils > apacheBeanUtils
前端
參考文章:
①做者:三石雨 原文:對象屬性拷貝工具類的性能比較java