问题记录Springsecurity抛出未登录异常
问题
自定义了一个权限拦截器A,在判断UserDetails不存在时,需要跳转未登录处理器authenticationEntryPoint,返回未登录响应码给前端。但实际上却跳转了accessDeniedHandler权限不足处理器。
.and()
.exceptionHandling()
.authenticationEntryPoint(((httpServletRequest, httpServletResponse, e) -> {
logger.info("请先登录");
JsonUtil.writeJSON(httpServletRequest