Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
yaru
fgqyxxlr
Commits
a1d9354d
Commit
a1d9354d
authored
Aug 25, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复expireTime会话超时时间无效问题
parent
2a6761d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
6 deletions
+26
-6
pom.xml
+1
-1
ruoyi-admin/src/main/resources/application.yml
+1
-1
ruoyi-admin/src/main/resources/ehcache/ehcache-shiro.xml
+24
-4
No files found.
pom.xml
View file @
a1d9354d
...
...
@@ -17,7 +17,7 @@
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<java.version>
1.8
</java.version>
<shiro.version>
1.4.
0
</shiro.version>
<shiro.version>
1.4.
1
</shiro.version>
<thymeleaf.extras.shiro.version>
2.0.0
</thymeleaf.extras.shiro.version>
<mybatis.boot.version>
1.3.2
</mybatis.boot.version>
<druid.version>
1.1.14
</druid.version>
...
...
ruoyi-admin/src/main/resources/application.yml
View file @
a1d9354d
...
...
@@ -109,7 +109,7 @@ shiro:
# 设置Cookie的过期时间,天为单位
maxAge
:
30
session
:
# Session超时时间(默认30分钟)
# Session超时时间
,-1代表永不过期
(默认30分钟)
expireTime
:
30
# 同步session到数据库的周期(默认1分钟)
dbSyncPeriod
:
1
...
...
ruoyi-admin/src/main/resources/ehcache/ehcache-shiro.xml
View file @
a1d9354d
...
...
@@ -3,7 +3,15 @@
<!-- 磁盘缓存位置 -->
<diskStore
path=
"java.io.tmpdir"
/>
<!-- maxEntriesLocalHeap:堆内存中最大缓存对象数,0没有限制 -->
<!-- maxElementsInMemory: 在内存中缓存的element的最大数目。-->
<!-- eternal:elements是否永久有效,如果为true,timeouts将被忽略,element将永不过期 -->
<!-- timeToIdleSeconds:失效前的空闲秒数,当eternal为false时,这个属性才有效,0为不限制 -->
<!-- timeToLiveSeconds:失效前的存活秒数,创建时间到失效时间的间隔为存活时间,当eternal为false时,这个属性才有效,0为不限制 -->
<!-- overflowToDisk: 如果内存中数据超过内存限制,是否要缓存到磁盘上 -->
<!-- statistics:是否收集统计信息。如果需要监控缓存使用情况,应该打开这个选项。默认为关闭(统计会影响性能)。设置statistics="true"开启统计 -->
<!-- 默认缓存 -->
<defaultCache
maxEntriesLocalHeap=
"1000"
...
...
@@ -22,8 +30,8 @@
overflowToDisk=
"false"
statistics=
"true"
>
</cache>
<!-- 系统活跃用户缓存 -->
<!-- 系统活跃用户缓存 -->
<cache
name=
"sys-userCache"
maxEntriesLocalHeap=
"10000"
overflowToDisk=
"false"
...
...
@@ -32,7 +40,18 @@
timeToLiveSeconds=
"0"
timeToIdleSeconds=
"0"
statistics=
"true"
>
</cache>
</cache>
<!-- 系统会话缓存 -->
<cache
name=
"shiro-activeSessionCache"
maxElementsInMemory=
"10000"
overflowToDisk=
"true"
eternal=
"true"
timeToLiveSeconds=
"0"
timeToIdleSeconds=
"0"
diskPersistent=
"true"
diskExpiryThreadIntervalSeconds=
"600"
>
</cache>
</ehcache>
\ No newline at end of file
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