将Redis中的字符串转化为实体类或者List集合
字符串转为实体类
String str = "{\"count\":2,\"createtime\":\"2021-11-28 10:26:01\"}";
MonitorModuleEntity monitorModuleEntity =
JSONObject.toJavaObject(JSONObject.parseObject(str), MonitorModuleEntity.class);
字符串转为List集合
String str = "[{\"count\":2,\"create.
原创
2021-11-28 11:15:16 ·
1339 阅读 ·
0 评论