Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡慧
cash-loan-flow-boss
Commits
3df98005
Commit
3df98005
authored
Jan 08, 2020
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置session 时间
parent
f5cba2c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
Bootstrap.java
src/main/java/cn/quantgroup/cashloanflowboss/Bootstrap.java
+12
-1
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/Bootstrap.java
View file @
3df98005
...
...
@@ -3,8 +3,11 @@ package cn.quantgroup.cashloanflowboss;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer
;
import
org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.netflix.feign.EnableFeignClients
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession
;
...
...
@@ -14,7 +17,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableTransactionManagement
@SpringBootApplication
(
scanBasePackages
=
{
"cn.quantgroup.cashloanflowboss"
})
@Configuration
@EnableAutoConfiguration
@ServletComponentScan
@EnableFeignClients
@EnableAsync
(
proxyTargetClass
=
true
)
...
...
@@ -24,4 +26,13 @@ public class Bootstrap {
SpringApplication
.
run
(
Bootstrap
.
class
,
args
);
}
@Bean
public
EmbeddedServletContainerCustomizer
containerCustomizer
()
{
return
container
->
{
container
.
setSessionTimeout
(
7200
);
// 单位为S
};
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment