| package com.zy.crm.common.utils; | 
|   | 
| import java.io.*; | 
| import java.util.List; | 
| import java.util.Map; | 
|   | 
| /** | 
|  * Created by vincent on 2020/10/17 | 
|  */ | 
| public class ListUtils { | 
|   | 
|     public static List<Map<String, Object>> deepCopy(List<Map<String, Object>> src) throws IOException, ClassNotFoundException { | 
|         ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); | 
|         ObjectOutputStream out = new ObjectOutputStream(byteOut); | 
|         out.writeObject(src); | 
|   | 
|         ByteArrayInputStream byteIn = new ByteArrayInputStream(byteOut.toByteArray()); | 
|         ObjectInputStream in = new ObjectInputStream(byteIn); | 
|         @SuppressWarnings("unchecked") | 
|         List<Map<String, Object>> dest = (List<Map<String, Object>>) in.readObject(); | 
|         return dest; | 
|     } | 
|   | 
| } |