|
|
@@ -32,6 +32,9 @@ public abstract class BaseController {
|
|
|
public String exceptionHandler(HttpServletRequest request, HttpServletResponse response, Exception exception) {
|
|
|
_log.error("统一异常处理:", exception);
|
|
|
request.setAttribute("ex", exception);
|
|
|
+ if (null != request.getHeader("X-Requested-With") && request.getHeader("X-Requested-With").equalsIgnoreCase("XMLHttpRequest")) {
|
|
|
+ request.setAttribute("requestHeader", "ajax");
|
|
|
+ }
|
|
|
// shiro没有权限异常
|
|
|
if (exception instanceof UnauthorizedException) {
|
|
|
return "/403";
|