欢迎光临散文网 会员登陆 & 注册

大圣React +Typescript企业级项目实战

2023-01-05 21:46 作者:666好听的名字  | 我要投稿

  @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);    }

大圣React +Typescript企业级项目实战的评论 (共 条)

分享到微博请遵守国家法律