public boolean isAjaxRequest(HttpServletRequest request){ String header = request.getHeader("X-Requested-With"); boolean isAjax = "XMLHttpRequest".equals(header) ? true:false; return isAjax; }
如何判断一个请求是不是ajax请求
原文:https://www.cnblogs.com/Jeely/p/10951301.html