Note that this method is intended to perform a "shallow copy" of the properties and so complex properties (for example, nested ones) will not be copied.
Note, that this method will not copy a List to a List, or an Object[] to an Object[]. It's specifically for copying JavaBean properties.
于是在网上借鉴了用输入输出流进行深度复制的方法,问题终于解决了,在此感谢豁然开朗的代码:
点击(此处)折叠或打开
privatestaticObject depthClone(Object srcObj){
74.Object cloneObj =null;
75.try{
76.ByteArrayOutputStream out =newByteArrayOutputStream();