chore(deps): 更新框架版本到1.5.2并改进安全配置日志
- 将zkh-framework父项目版本从1.5.1更新到1.5.2 - 同步更新所有子模块(zkh-common, zkh-data, zkh-file, zkh-log, zkh-web)的父版本 - 在WebSecurityConfig中改进认证失败日志记录,添加请求URI信息
This commit is contained in:
@ -143,7 +143,7 @@ public class WebSecurityConfig {
|
||||
TokenRedisStorage tokenRedisStorage) implements AuthenticationEntryPoint, AuthenticationFailureHandler, AuthenticationSuccessHandler {
|
||||
@Override
|
||||
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
|
||||
log.warn("认证失败", authException);
|
||||
log.warn("访问 {} ,但是认证失败", request.getRequestURI(), authException);
|
||||
R<Object> data = new R<>(HttpServletResponse.SC_UNAUTHORIZED, "未登录", false, null);
|
||||
response.setContentType("application/json;charset=UTF-8");
|
||||
objectMapper.writeValue(response.getWriter(), data);
|
||||
|
||||
Reference in New Issue
Block a user