[ Ajax ] JAVA Controller에서 json 형식으로 데이터 가져오기
Ajax 부분 $.ajax({ type: "POST", url: url, data: data, dataType: 'json', success: function(data){ data.키값; }, error: function(request, status, error){ alert(request.status + "#" + request.message + "#" + error); } }) Controller 부분 @RequestMapping(url) @ResponseBody public String functionName(...)throws Exception{ ... HashMap hashMap = new HashMap(); hashMap.put("키값", 값); return JSONObject.fromObje..
2019. 10. 28. 16:24