BeanMapper:比BeanUtils.copyProperties更快

上传者: 42131785 | 上传时间: 2023-01-12 11:30:28 | 文件大小: 65KB | 文件类型: ZIP
BeanMapper 一个BeanUtils.copyProperties的小型快速替代。 起因 由于BeanUtils(Spring或Apache Commons)的copyProperties实现是利用反射实现的,它在大量调用时具有比较严重的性能问题。 BeanMapper通过javassist类库实现在运行时直接生成字节码来转换类,在首次生成后,后续运行可以提供近原生的读写速度。 限制条件 类必须具有符合小驼峰规范的JavaBean setter和getter。否则无法正常访问类。 类必须是公共可见的,否则会发生访问错误。 效率 在10000000次复制测试中 BeanUtils.copyProperties用时9809毫秒 StaticBeanMapper.copy用时100毫秒(首次编译)+ 3633毫秒(后续10000000次调用) BeanMapper.copy用时98毫

文件下载

资源详情

[{"title":"( 16 个子文件 65KB ) BeanMapper:比BeanUtils.copyProperties更快","children":[{"title":"BeanMapper-master","children":[{"title":"gradlew <span style='color:#111;'> 5.63KB </span>","children":null,"spread":false},{"title":"settings.gradle <span style='color:#111;'> 33B </span>","children":null,"spread":false},{"title":".github","children":[{"title":"workflows","children":[{"title":"releases.yml <span style='color:#111;'> 366B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"party","children":[{"title":"liyin","children":[{"title":"test","children":[{"title":"Test.java <span style='color:#111;'> 4.59KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"java","children":[{"title":"party","children":[{"title":"liyin","children":[{"title":"beanmapper","children":[{"title":"StaticBeanMapper.java <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false},{"title":"BeanMapper.java <span style='color:#111;'> 2.90KB </span>","children":null,"spread":false},{"title":"BeanCopyable.java <span style='color:#111;'> 112B </span>","children":null,"spread":false},{"title":"BeanMapperException.java <span style='color:#111;'> 171B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"LICENSE <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"gradle","children":[{"title":"wrapper","children":[{"title":"gradle-wrapper.properties <span style='color:#111;'> 200B </span>","children":null,"spread":false},{"title":"gradle-wrapper.jar <span style='color:#111;'> 57.53KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 899B </span>","children":null,"spread":false},{"title":"gradlew.bat <span style='color:#111;'> 2.88KB </span>","children":null,"spread":false},{"title":"gradle.properties <span style='color:#111;'> 26B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 26B </span>","children":null,"spread":false},{"title":"build.gradle <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明