diff --git a/src/main/java/com/fjy/spring/controller/NavController.java b/src/main/java/com/fjy/spring/controller/NavController.java
index 051db6b..0578097 100644
--- a/src/main/java/com/fjy/spring/controller/NavController.java
+++ b/src/main/java/com/fjy/spring/controller/NavController.java
@@ -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;
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index e4cc4bb..e702b4a 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -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
-
diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml
index abf1b06..b5e8e1a 100644
--- a/src/main/resources/application-prod.yml
+++ b/src/main/resources/application-prod.yml
@@ -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
-
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 9efaa1c..7ef289a 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,4 +1,4 @@
#控制配置文件调用
spring:
profiles:
- active: dev
\ No newline at end of file
+ active: prod
\ No newline at end of file
diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml
index 71c159c..272ad8e 100644
--- a/src/main/resources/logback-spring.xml
+++ b/src/main/resources/logback-spring.xml
@@ -25,8 +25,8 @@
- F:\JAVA Workspace\Temp\log\%d\info.%d.log
-
+
+ /www/cmsfile/%d/info.%d.log
@@ -44,8 +44,8 @@
- F:\JAVA Workspace\Temp\log\error.%d.log
-
+
+ /www/cmsfile/%d/error.%d.log