原文链接:https://blog.csdn.net/hp_yangpeng/article/details/80592332
通过com.fastxml.jackson的ObjectMapper对象进行转换:
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.convertValue(Object fromValue, Class<T> toValueType);
例子:
Result result1 = eduClient.getCourseInfoOrder(courseId);
ObjectMapper mapper = new ObjectMapper();
CourseWebVoOrder course = mapper.convertValue(result1.getData().get("course"), CourseWebVoOrder.class);