大圣React +Typescript企业级项目实战
@org.junit.Test
public void coneableCopy() throws CloneNotSupportedException, JsonProcessingException {
// 被克隆的类
Student xiaoMing = new Student("小明");
// 使用Jackson序列化进行深拷贝
ObjectMapper objectMapper = new ObjectMapper();
Student copyStudent = objectMapper.readValue(objectMapper.writeValueAsString(xiaoMing), Student.class);
System.out.println(xiaoMing == copyStudent);
}