|
@@ -526,8 +526,10 @@ public class ReportCommonServiceImpl implements ReportCommonService {
|
|
|
HttpServletRequest request = ServletUtil.getRequest();
|
|
|
HttpServletResponse response = ServletUtil.getResponse();
|
|
|
HttpSession session = request.getSession();
|
|
|
- session.invalidate();
|
|
|
- log.info("logout is come in,session:{}", JacksonUtil.parseJson(session));
|
|
|
+ if (Objects.nonNull(session)) {
|
|
|
+ session.invalidate();
|
|
|
+ log.info("logout is come in,session:{}", JacksonUtil.parseJson(session));
|
|
|
+ }
|
|
|
String casLogoutURL = "http://cas.whu.edu.cn/authserver/logout";
|
|
|
// service后面带的参数为应用的访问地址,需要使用URLEncoder进行编码
|
|
|
String redirectURL = casLogoutURL + "?service=" + URLEncoder.encode("http://cas.whu.edu.cn/authserver/login", SystemConstant.CHARSET_NAME);
|