//首先获取前端传递过来的参数对象“shopping”,转化成Object
    Object object = requestObject.get("shopping");
    //创建ObjectMapper 
    ObjectMapper objectMapper = new ObjectMapper();
    //强制转化成目标对象
    Shopping shopping = objectMapper.convertValue(object, Shopping.class);

关注我的公众号SpaceObj 领取idea系列激活码

posted on 2023-05-11 09:55  张伯灵  阅读(27)  评论(0编辑  收藏  举报