https://blog.csdn.net/qq_42483473/article/details/128984514
import com.alibaba.fastjson.JSON;import java.util.ArrayList;
import java.util.List;/*** @author */
public class ObjectConversion {/*** 从List<A> copy到List<B>* @param list List<B>* @param clazz B* @return List<B>*/public static <T> List<T> copy(List<?> list, Class<T> clazz){String oldOb = JSON.toJSONString(list);return JSON.parseArray(oldOb, clazz);}
}