gistfile1.txt @ResponseBody@RequestMapping(value="/queryUserAjax", method={RequestMethod.GET,RequestMethod.POST})public Map queryUserAjax(HttpServletRequest request, HttpServletResponse response) throws SQLException {Map list = this.userSer
@ResponseBody @RequestMapping(value="/queryUserAjax", method={RequestMethod.GET,RequestMethod.POST}) public MapqueryUserAjax(HttpServletRequest request, HttpServletResponse response) throws SQLException { Map list = this.userService.queryUser(); System.out.println(request); // response.setHeader("Access-Control-Allow-Origin", "http://192.168.100.23:8020"); response.setHeader("Access-Control-Allow-Origin", "*"); response.setHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS"); response.setHeader("Access-Control-Max-Age", "3600"); response.addHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); return list; }