将对象类型 转换为String类型 输出具体信息
@Test public void convertMaptoString() { Map<Integer, List<User>> map= userService.getAllUser(); try { ObjectMapper mapper = new ObjectMapper(); String userMapStr = mapper.writeValueAsString(map); System.out.println("yyyyyyyyyy===="+userMapStr ); } catch (Exception e) { e.printStackTrace(); }