ajax @ResponseBody없이 json 처리
@ResponseBody Annotation을 사용하게 되면 Controller에서 return "json결과"; 하는 경우 json으로 "json결과" 라는 String 을 받게된다. Y/N 식의 단발성 DATA라면 관계 없지만 여러개의 결과값을 받고자 한다면 Map식의 결과를 받는 것이 좋다. 이럴 때 사용할 수 있는 방법이다. * xxHTML.jsp 의 경우 $.ajax( { type : "post", url : "/xxProc.do", data : $("#formid").serialize(), dataType : "json", success : function( data ) { if( "Y" == data.result ) { alert( data.message ); } } } ); * xxCont..
2016.03.08