mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
重构注解鉴权底层,可以方便的自定义注解了
This commit is contained in:
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
import cn.dev33.satoken.exception.DisableServiceException;
|
||||
import cn.dev33.satoken.exception.NotBasicAuthException;
|
||||
import cn.dev33.satoken.exception.NotHttpBasicAuthException;
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
import cn.dev33.satoken.exception.NotPermissionException;
|
||||
import cn.dev33.satoken.exception.NotRoleException;
|
||||
@@ -66,8 +66,8 @@ public class HandlerException {
|
||||
}
|
||||
|
||||
// Http Basic 校验失败,code=903
|
||||
@ExceptionHandler(NotBasicAuthException.class)
|
||||
public SaResult handlerNotBasicAuthException(NotBasicAuthException e) {
|
||||
@ExceptionHandler(NotHttpBasicAuthException.class)
|
||||
public SaResult handlerNotBasicAuthException(NotHttpBasicAuthException e) {
|
||||
return SaResult.error().setCode(903);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user