All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.shitsurei.dao.exception.CustomAccessDeniedException Maven / Gradle / Ivy

The newest version!
package io.github.shitsurei.dao.exception;

import io.github.shitsurei.dao.enumerate.system.GlobalExceptionEnum;
import org.springframework.security.access.AccessDeniedException;

/**
 * 自定义授权异常
 *
 * @author zhanggr-b
 * @version 1.0
 * @date 2021/12/28 14:53
 */
public class CustomAccessDeniedException extends AccessDeniedException {
    private GlobalExceptionEnum exceptionEnum;

    public CustomAccessDeniedException(GlobalExceptionEnum exceptionEnum) {
        super(exceptionEnum.getErrorMsg());
        this.exceptionEnum = exceptionEnum;
    }

    public GlobalExceptionEnum getExceptionEnum() {
        return exceptionEnum;
    }

    public void setExceptionEnum(GlobalExceptionEnum exceptionEnum) {
        this.exceptionEnum = exceptionEnum;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy