From ec7282fc18b911f87999801a7f7b0f8721aac1c5 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 7 Dec 2022 22:45:24 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=BB=9F=E4=B8=80session=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E6=97=B6=E9=97=B4=E7=9A=84key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/controller/SystemParameterController.java | 2 +- .../sdk-parent/sdk/src/main/resources/commons.properties | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SystemParameterController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SystemParameterController.java index dddad0f371..3d03243ffe 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SystemParameterController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/SystemParameterController.java @@ -54,7 +54,7 @@ public class SystemParameterController { @GetMapping("timeout") public long getTimeout() { - return env.getProperty("session.timeout", Long.class, 43200L); // 默认43200s, 12个小时 + return env.getProperty("spring.session.timeout", Long.class, 43200L); // 默认43200s, 12个小时 } @GetMapping("/mail/info") diff --git a/framework/sdk-parent/sdk/src/main/resources/commons.properties b/framework/sdk-parent/sdk/src/main/resources/commons.properties index c9170eb62a..8bd98f40e8 100644 --- a/framework/sdk-parent/sdk/src/main/resources/commons.properties +++ b/framework/sdk-parent/sdk/src/main/resources/commons.properties @@ -88,10 +88,8 @@ management.server.port=8083 management.endpoints.web.exposure.include=* management.endpoints.enabled-by-default=false #spring.freemarker.checkTemplateLocation=false -spring.session.timeout=${session.timeout:43200} +spring.session.timeout=43200s spring.session.store-type=none -# cookie -server.servlet.session.cookie.max-age=${session.timeout:43200} # eureka eureka.client.service-url.defaultZone=http://localhost:8761/eureka/ eureka.instance.prefer-ip-address=true