设置session超时时间
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
package com.fjy.spring.controller;
|
||||
|
||||
import com.fjy.spring.domain.TbUser;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.SessionAttributes;
|
||||
import org.springframework.web.bind.support.SessionStatus;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import static com.fjy.spring.constant.GlobalConstant.USER_SESSION_KEY;
|
||||
|
||||
@Controller
|
||||
@SessionAttributes(USER_SESSION_KEY)
|
||||
public class NavController {
|
||||
@Resource
|
||||
HttpServletRequest request;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
server:
|
||||
servlet:
|
||||
context-path: /cms
|
||||
session:
|
||||
timeout: 1440s
|
||||
port: 8080
|
||||
serverproperties:
|
||||
port_num: 8080
|
||||
@@ -31,4 +33,3 @@ spring:
|
||||
#resources:
|
||||
# static-locations: classpath:/templates/
|
||||
debug: true
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
server:
|
||||
servlet:
|
||||
context-path: /cms
|
||||
session:
|
||||
timeout: 1440s
|
||||
port: 8081
|
||||
serverproperties:
|
||||
port_num: 8081
|
||||
@@ -30,4 +32,3 @@ spring:
|
||||
#resources:
|
||||
# static-locations: classpath:/templates/
|
||||
debug: false
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#控制配置文件调用
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
@@ -25,8 +25,8 @@
|
||||
<!--滚动策略-->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!--路径文件名,文件名包含时间-->
|
||||
<fileNamePattern>F:\JAVA Workspace\Temp\log\%d\info.%d.log</fileNamePattern>
|
||||
<!--<fileNamePattern>/www/cmsfile/%d/info.%d.log</fileNamePattern>-->
|
||||
<!--<fileNamePattern>F:\JAVA Workspace\Temp\log\%d\info.%d.log</fileNamePattern>-->
|
||||
<fileNamePattern>/www/cmsfile/%d/info.%d.log</fileNamePattern>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
<!--滚动策略-->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!--路径文件名,文件名包含时间-->
|
||||
<fileNamePattern>F:\JAVA Workspace\Temp\log\error.%d.log</fileNamePattern>
|
||||
<!--<fileNamePattern>/www/cmsfile/%d/error.%d.log</fileNamePattern>-->
|
||||
<!--<fileNamePattern>F:\JAVA Workspace\Temp\log\error.%d.log</fileNamePattern>-->
|
||||
<fileNamePattern>/www/cmsfile/%d/error.%d.log</fileNamePattern>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user