LimitActionConfig是ActionConfig的子类,RuleConfig的有个属性是ActionConfig,需要反序列化成LimitActionConfig
        ParserConfig parserConfig = new ParserConfig() {
@Override
public ObjectDeserializer getDeserializer(Type type) {
if (type == ActionConfig.class) {
return super.getDeserializer(LimitActionConfig.class);
}
return super.getDeserializer(type);
}
}; RuleConfig ruleConfig = new RuleConfig();
ruleConfig.setDesc("xxx");
LimitActionConfig limitActionConfig = new LimitActionConfig();
limitActionConfig.setResponseContent("ddd");
ruleConfig.setActionConfig(limitActionConfig); String text = JSON.toJSONString(ruleConfig);
System.out.println(text); RuleConfig ruleConfig2 = JSON.parseObject(text, RuleConfig.class, parserConfig);
System.out.println(ruleConfig2);

参考:https://www.cnblogs.com/whitewolf/p/4355541.html

最新文章

  1. C# - 多线程 之 锁系统
  2. BZOJ1001: [BeiJing2006]狼抓兔子 [最小割 | 对偶图+spfa]
  3. 如何在在WinFrom的DataGridView中做到数据持续动态加载而不卡死
  4. CIQRCodeGenerator Core Image Filter Reference
  5. tableview侧滑删除
  6. loadrunner统计字符串中指定字符出现的次数
  7. mysql触发器查看
  8. keyStore vs trustStore--转载
  9. c# json转Dictionary字典
  10. Mac OS X平台上Java环境的配置
  11. Hibernate4 : 持久化你的第一个类
  12. overflow的几个坑
  13. oracle语句总结(一)
  14. 在VB6/VBA中使用正则表达式
  15. (知识点)JavaScript闭包
  16. chrome调试工具高级不完整使用指南(基础篇)
  17. vue引入fastclick设置输入框type="number"报错Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection.的解决办法
  18. Python 3中bytes/string的区别
  19. Oracle组成介绍
  20. 蜻蜓fm面试

热门文章

  1. Ueditor 关于视频上传相关问题
  2. formData详细使用教程
  3. 92.vue---新手从本地项目开发到服务器线上运行爬坑。
  4. 阿里云ECS使用vnc远程连接(Ubuntu + CentOS)
  5. ApplicationContext的名称解释
  6. Golang: 模拟搜索引擎爬虫
  7. Jquery学习笔记,全面实用,需要的可以留下邮箱,给大家发原稿文档
  8. 什么是OSI参考模型?
  9. Beta冲刺第4次
  10. httprunner学习11-辅助函数debugtalk.py