BeanUtils.copyProperties(plan,poiInterchangePortPlanInfo);
当我们开启阿里代码扫描插件时,如果你使用了 Apache BeanUtils.copyProperties 进行属性拷贝,它会给你一个非常严重的警告。因为,Apache BeanUtils性能较差,可以使用 Spring BeanUtils 或者 Cglib BeanCopier 来代替。
BeanUtils.copyProperties(plan,poiInterchangePortPlanInfo);
public boolean setInfo() throws Exception {
BeanUtils.copyProperties(yy,xx);
return true;
}
文章指出,在使用Apache BeanUtils.copyProperties进行属性拷贝时,可能会触发阿里代码扫描插件的严重警告,因为这种方法性能较低。建议使用Spring BeanUtils或CglibBeanCopier作为替代方案,以提高代码效率。
1211

被折叠的 条评论
为什么被折叠?



