方法一JSON序列化
String json = JSONArray.toJSONString(this);
DbValidator dbValidator = JSONArray.parseObject(json, this.getClass());
方法二使用流输出并读取
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(this);
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
return ois.readObject();