扩展Spring MVC 用以支持Controller对Ajax的处理
Spring Mvc中没有特别针对于Ajax请求的处理Controller.但是AbstractController和?
SimpleFormController也是可以针对Ajax的请求给与相应的.但显得有一点点的不自然.?
- @Override??
- protected?ModelAndView?onSubmit(HttpServletRequest?request,?HttpServletResponse?response,?Object?cmd,??
- ????????BindException?ex)?{??
- ????String?userId=request.getParamater("userId");??
- ?????????????????Map?userInfoMap=userDao.getUserBaseInfo(userId);??
- ?????????????????JSONObject?object?=?new?JSONObject();??
- ?????????????????object.