Spring减少MVC的代码冗余
通过@ResponseBody返回页面Ajax信息
public @ResponseBody String failDialog(HttpServletRequest request) {
Stringmsg = parseException(request);
AjaxObjectajaxObject = new AjaxObject(msg);
ajaxObject.setStatusCode(AjaxObject.STATUS_CODE_FAILURE);
ajaxObject.setCallbackType("");
returnajaxObject.toString();
}
版权声明:本文为博主原创文章,未经博主允许不得转载。