mirror of
https://github.com/dqjdda/Aurora.git
synced 2018-11-06 05:33:29 +00:00
前端框架更新,layui更新到2.4.3,代码优化,更新sql文件
This commit is contained in:
@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package me.aurora.config.exception.handler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.aurora.config.AuroraProperties;
|
||||
import me.aurora.domain.ResponseEntity;
|
||||
import me.aurora.config.exception.AuroraException;
|
||||
import org.apache.shiro.authz.AuthorizationException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
@@ -17,6 +19,9 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
@RestControllerAdvice
|
||||
public class GlobalExceptionHandler {
|
||||
|
||||
@Autowired
|
||||
private AuroraProperties auroraProperties;
|
||||
|
||||
/**
|
||||
* 处理shiro异常
|
||||
* @return
|
||||
@@ -24,7 +29,7 @@ public class GlobalExceptionHandler {
|
||||
@ExceptionHandler(value = AuthorizationException.class)
|
||||
public ModelAndView handleAuthorizationException() {
|
||||
log.error("没有权限访问");
|
||||
return new ModelAndView("/exception/403");
|
||||
return new ModelAndView(auroraProperties.getShiro().getUnauthorizedUrl());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user