|
|
@@ -45,13 +45,12 @@ public class Oauth2Controller { |
|
|
|
@GetMapping("/toLogout") |
|
|
|
public void exit(HttpServletRequest request, HttpServletResponse response) { |
|
|
|
new SecurityContextLogoutHandler().logout(request, null, null); |
|
|
|
try { |
|
|
|
System.out.println(request.getHeader("referer")); |
|
|
|
response.sendRedirect(request.getHeader("referer")); |
|
|
|
response.sendRedirect("http://www.baidu.com"); |
|
|
|
} catch (IOException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
// try { |
|
|
|
// System.out.println(request.getHeader("referer")); |
|
|
|
// response.sendRedirect(request.getHeader("referer")); |
|
|
|
// } catch (IOException e) { |
|
|
|
// e.printStackTrace(); |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
} |