kongzy
2024-07-05 14821e28286d773ad5ff2c13510e39c5eb117daf
exam-framework/src/main/java/com/gkhy/exam/framework/security/handle/AuthenticationEntryPointImpl.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson2.JSON;
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.common.api.ResultCode;
import com.gkhy.exam.common.utils.ServletUtils;
import com.gkhy.exam.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
@@ -30,7 +31,7 @@
    {
        String msg = StringUtils.format("请求访问:{},认证失败,无法访问系统资源", request.getRequestURI());
        log.error(msg);
        ServletUtils.renderString(response, JSON.toJSONString(CommonResult.failed(msg)));
        ServletUtils.renderString(response, JSON.toJSONString(CommonResult.failed(ResultCode.FORBIDDEN,msg)));
    }
}