spring BeanUtils复制bean后字段无直问题

把dto拷贝到entity时  phone有时没拷贝  后来发现 phone为Long 它的setLong()为long型  后来改为Long就可以了


beanUtil.copy(src,dest); 

如src和dest都有name属性 类型不同  复制失败

猜你喜欢

转载自blog.csdn.net/nailsoul/article/details/51537765