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