diff --git a/youlai-common/common-security/src/main/java/com/youlai/common/security/exception/MyAuthenticationEntryPoint.java b/youlai-common/common-security/src/main/java/com/youlai/common/security/exception/MyAuthenticationEntryPoint.java index d1d17d296..95c459ba2 100644 --- a/youlai-common/common-security/src/main/java/com/youlai/common/security/exception/MyAuthenticationEntryPoint.java +++ b/youlai-common/common-security/src/main/java/com/youlai/common/security/exception/MyAuthenticationEntryPoint.java @@ -23,7 +23,7 @@ import java.io.IOException; public class MyAuthenticationEntryPoint implements AuthenticationEntryPoint { @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) - throws IOException, ServletException { + throws IOException { response.setContentType("application/json"); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); ObjectMapper mapper = new ObjectMapper();