| | |
| | | |
| | | 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; |
| | |
| | | { |
| | | 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.UNAUTHORIZED,msg))); |
| | | |
| | | } |
| | | } |