|
|
@@ -9,6 +9,8 @@ import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
+import java.time.Duration;
|
|
|
+
|
|
|
/**
|
|
|
* @author reghao
|
|
|
* @date 2024-02-01 13:15:13
|
|
|
@@ -17,12 +19,15 @@ import org.springframework.context.annotation.Configuration;
|
|
|
public class TomcatConfig {
|
|
|
@Bean
|
|
|
public ServletWebServerFactory servletContainer(){
|
|
|
- return new TomcatServletWebServerFactory() {
|
|
|
+ TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() {
|
|
|
@Override
|
|
|
protected void postProcessContext(Context context) {
|
|
|
context.setSessionCookieName("SESSDATA");
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ //tomcat.getSession().setTimeout(Duration.ofDays(7));
|
|
|
+ return tomcat;
|
|
|
}
|
|
|
|
|
|
@Bean
|