在mybatis中返回类型是map,map中有时间类型时,返回前台spring mvc 自动转json失败 通过以下错误可以看出spring mvc 自动转换时 错误日志 ObjectMapper mapper = new ObjectMapper(); try { String jsonString = mapper.writeValueAsString(PresentPage.getDataTables(draw)); System.out.print(jsonString); } catch (JsonGenerationException e) { e.printStackTrace(); log.error(e.getMessage(), e); } catch (JsonMappingException e) { e.printStackTrace(); log.error(e.getMessage(), e); } catch (IOException e) { e.printStackTrace(); log.error(e.getMessage(), e); }
转载于:https://my.oschina.net/qingpei88800/blog/707195