控制器和jsp:
1234567891011121314151617181920212223242526
@RequestMapping(produces="text/plain;charset=UTF-8",value="datagridToJson") @ResponseBody public String datagridToJson(HttpServletRequest req) throws JsonGenerationException, JsonMappingException, IOException{ ObjectMapper objectMapper = new ObjectMapper(); Map map=new HashMap<>(); Book book=new Book(1, "剪掉你的dingding", "大叔"); Book book1=new Book(2, "洗掉你的dingding", "大姐"); List
BOOk的ID BOOk作者 BOOk名字