Object类型转为Map 强制转换

Object类型转为Map:

强制转换:


Map<String, Object> resultMap = new HashMap<>();
Map<String, Object> repairMap = new HashMap<>();
repairMap.put("id",entity);
resultMap.put("repair",repairMap);

想要获取repairMap

Map<String, Object> repairBefore =(Map<String,Object>)resultMap.get("repair");
    原文作者:小岛牙牙怪
    原文地址: https://blog.csdn.net/baidu_29437989/article/details/116201297
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞