Merge branch 'new_3A' of axzsource.com:infra/axzo-framework into new_3A
This commit is contained in:
commit
70543c0d8d
@ -0,0 +1,27 @@
|
||||
package cn.axzo.framework.auth;
|
||||
|
||||
import cn.azxo.framework.common.model.CommonResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
/**
|
||||
* @author cn
|
||||
* @version 1.0
|
||||
* @description
|
||||
* @date 2022/6/15 17:45
|
||||
*/
|
||||
@Slf4j
|
||||
@Order(0)
|
||||
@RestControllerAdvice
|
||||
public class AuthExceptionHandler {
|
||||
|
||||
@ExceptionHandler(AuthException.class)
|
||||
public CommonResponse<Void> exceptionSerHandler(AuthException e) {
|
||||
log.warn("业务异常", e);
|
||||
return CommonResponse.fail(e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
@ -39,7 +39,6 @@ import java.util.Objects;
|
||||
|
||||
@Slf4j
|
||||
@Aspect
|
||||
@Component
|
||||
@Order(1)
|
||||
public class ContextInfoBuilderAspect {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user