feng_ting-ting 2 周之前
父节点
当前提交
4ef8bc8efe

+ 2 - 1
XiaoETech-admin/src/main/resources/application.yml

@@ -20,6 +20,8 @@ server:
   servlet:
     # 应用的访问路径
     context-path: /
+    session:
+      timeout: 30m
   tomcat:
     # tomcat的URI编码
     uri-encoding: UTF-8
@@ -131,4 +133,3 @@ xss:
 wx-app:
   appId: wxa2a76a594be60e4d
   appSecret: 73e228a4fea627fb74d5a9de8585d880
-  scope: snsapi_userinfo

+ 8 - 6
XiaoETech-framework/src/main/java/com/zhentao/framework/config/ResourcesConfig.java

@@ -1,6 +1,8 @@
 package com.zhentao.framework.config;
 
-import java.util.concurrent.TimeUnit;
+import com.zhentao.common.config.RuoYiConfig;
+import com.zhentao.common.constant.Constants;
+import com.zhentao.framework.interceptor.RepeatSubmitInterceptor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -11,13 +13,12 @@ import org.springframework.web.filter.CorsFilter;
 import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
 import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-import com.zhentao.common.config.RuoYiConfig;
-import com.zhentao.common.constant.Constants;
-import com.zhentao.framework.interceptor.RepeatSubmitInterceptor;
+
+import java.util.concurrent.TimeUnit;
 
 /**
  * 通用配置
- * 
+ *
  * @author ruoyi
  */
 @Configuration
@@ -55,6 +56,7 @@ public class ResourcesConfig implements WebMvcConfigurer
     public CorsFilter corsFilter()
     {
         CorsConfiguration config = new CorsConfiguration();
+        config.setAllowCredentials(true);
         // 设置访问源地址
         config.addAllowedOriginPattern("*");
         // 设置访问源请求头
@@ -69,4 +71,4 @@ public class ResourcesConfig implements WebMvcConfigurer
         // 返回新的CorsFilter
         return new CorsFilter(source);
     }
-}
+}