diff --git a/study-project-backend/src/main/java/com/example/config/SecurityConfiguration.java b/study-project-backend/src/main/java/com/example/config/SecurityConfiguration.java index f4f6cdd..f3e37c6 100644 --- a/study-project-backend/src/main/java/com/example/config/SecurityConfiguration.java +++ b/study-project-backend/src/main/java/com/example/config/SecurityConfiguration.java @@ -42,8 +42,6 @@ public class SecurityConfiguration { .and() .logout() .logoutUrl("/api/auth/logout") - .logoutSuccessHandler(this::onAuthenticationSuccess) - .permitAll() .and() .csrf() .disable() @@ -84,10 +82,7 @@ public class SecurityConfiguration { public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException { response.setCharacterEncoding("utf-8"); - if(request.getRequestURI().endsWith("/login")) - response.getWriter().write(JSONObject.toJSONString(RestBean.success("登录成功"))); - else if(request.getRequestURI().endsWith("/logout")) - response.getWriter().write(JSONObject.toJSONString(RestBean.success("退出成功"))); + response.getWriter().write(JSONObject.toJSONString(RestBean.success("登录成功"))); } public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException { diff --git a/study-project-frontend/.vscode/extensions.json b/study-project-frontend/.vscode/extensions.json deleted file mode 100644 index c0a6e5a..0000000 --- a/study-project-frontend/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] -} diff --git a/study-project-frontend/index.html b/study-project-frontend/index.html index 99f583a..6334178 100644 --- a/study-project-frontend/index.html +++ b/study-project-frontend/index.html @@ -5,9 +5,14 @@