XStream: UnknownFieldException - No such field
程序员文章站
2022-05-29 22:50:40
...
解决办法重写wrapMapper方法
return new XStream() { @Override protected MapperWrapper wrapMapper(MapperWrapper next){ return new MapperWrapper(next) { @Override public boolean shouldSerializeMember(Class definedIn, String fieldName){ if (definedIn == Object.class){ try { return this.realClass(fieldName) != null; } catch (Exception e){ return false; } } else { return super.shouldSerializeMember(definedIn, fieldName); } } }; } };
推荐阅读
-
Vue xStream 2015.2安装及破解教程详细图解(附下载)
-
MySQL 5.7.16 修改密码提示 ERROR 1054 (42S22): Unknown column ''password'' in ''field l
-
oracle 导入报错:field in data file exceeds maximum length
-
Vue XStream 2016 中文破解版安装教程(附破解文件)
-
MySQL添加用户错误:ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value解决方法
-
Django的Field(字段)
-
Vue XStream Pro 2018 x1激活破解版详细安装教程(附下载)
-
MySQL 5.7.16 修改密码提示 ERROR 1054 (42S22): Unknown column ''password'' in ''field list''的原因
-
MySQL中的排序函数field()实例详解
-
解决 django.db.utils.InternalError: (1054, “Unknown column ‘xxx.字段‘ in ‘field list‘“) 问题