Просмотр исходного кода

物业系统支持单点登录功能

Your Name лет назад: 3
Родитель
Сommit
b07eb2b240
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      springboot/src/main/java/com/java110/boot/aop/PageProcessAspect.java

+ 2 - 2
springboot/src/main/java/com/java110/boot/aop/PageProcessAspect.java

@@ -216,8 +216,8 @@ public class PageProcessAspect {
      * @throws IOException
      * @throws IOException
      */
      */
     private void writeCookieInfo(IPageData pd, ServletRequestAttributes attributes) throws IOException {
     private void writeCookieInfo(IPageData pd, ServletRequestAttributes attributes) throws IOException {
-        // 这里目前只写到组件级别,如果需要 写成方法级别
-        if (!StringUtil.isNullOrNone(pd.getToken()) && "login".equals(pd.getComponentCode())) {
+        // 这里目前只写到组件级别,如果需要 写成方法级别 && "login".equals(pd.getComponentCode())
+        if (!StringUtil.isNullOrNone(pd.getToken()) ) {
             HttpServletResponse response = attributes.getResponse();
             HttpServletResponse response = attributes.getResponse();
             Cookie cookie = new Cookie(CommonConstant.COOKIE_AUTH_TOKEN, pd.getToken());
             Cookie cookie = new Cookie(CommonConstant.COOKIE_AUTH_TOKEN, pd.getToken());
             cookie.setHttpOnly(true);
             cookie.setHttpOnly(true);