//查询所有合同
@RequestMapping(value = "/selectContract",method=RequestMethod.POST)
@ResponseBody
public void selectContract(String value, HttpServletResponse response) throws IOException {
System.out.println(value);
List list = new ArrayList();
list = contractService.selectContract();
System.out.println("0000000000"+list.toString());
System.out.println("6666666666666");
response.setContentType("application/json;charset=utf-8");
System.out.println("777777777777");
ObjectMapper mapper = new ObjectMapper();
System.out.println("00000");
mapper.writeValue(System.out,list);
System.out.println("111111");
}
输出是
0000000000[Contract{contracttitle='企客宝旗舰版销售合同', contractnumber='1', customer='北京博众公司', personincharge='张三', contractamount=12.0, contractsigningdate='1', state='1', contractstartdate='1', contractenddate='11', creationtime='11', updatetime='11'}, Contract{contracttitle='企客宝旗舰版销售合同', contractnumber='22', customer='北京博众公司', personincharge='孙伟', contractamount=22.0, contractsigningdate='22', state='22', contractstartdate='22', contractenddate='22', creationtime='22', updatetime='22'}]
6666666666666
777777777777