标签:tst back out 输出 job lse equals span entity
GxyJobEntity gxyJobEntity1 = new GxyJobEntity(); gxyJobEntity1.setUserId("user001"); gxyJobEntity1.setPlanId("plan001"); gxyJobEntity1.setStudentId("stu001"); System.out.println(gxyJobEntity1); String str = JSONUtil.toJsonStr(gxyJobEntity1); System.out.println(str); GxyJobEntity studentEntity= JSONUtil.toBean(str,GxyJobEntity.class); System.out.println(studentEntity); System.out.println(gxyJobEntity1.equals(studentEntity));
输出:
GxyJobEntity [jobId=null, studentId=stu001, planId=plan001, userId=user001]
{"studentId":"stu001","planId":"plan001","userId":"user001"}
GxyJobEntity [jobId=null, studentId=stu001, planId=plan001, userId=user001]
false
hutool-all 包把实体Bean转化成字符串,以及把字符串转化成Bean对象
标签:tst back out 输出 job lse equals span entity
原文地址:https://www.cnblogs.com/z360519549/p/11540006.html