以前的笔记主要涉及前端,以后会以这个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