Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
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
liqin
chnmuseum-party
Commits
c33e4d1b
Commit
c33e4d1b
authored
Mar 12, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
389a09fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
ShiroConfig.java
...n/java/cn/wisenergy/chnmuseum/party/conf/ShiroConfig.java
+13
-13
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/conf/ShiroConfig.java
View file @
c33e4d1b
...
...
@@ -122,19 +122,19 @@ public class ShiroConfig {
@Bean
public
MyShiroRealm
myShiroRealm
()
{
MyShiroRealm
myShiroRealm
=
myShiroRealm
();
//开启全局缓存配置
myShiroRealm
.
setCachingEnabled
(
true
);
//启用身份验证缓存,即缓存AuthenticationInfo信息,默认false
myShiroRealm
.
setAuthenticationCachingEnabled
(
true
);
//启用授权缓存,即缓存AuthorizationInfo信息,默认false
myShiroRealm
.
setAuthorizationCachingEnabled
(
true
);
//为了方便操作,我们给缓存起个名字
myShiroRealm
.
setAuthenticationCacheName
(
"authcCache"
);
myShiroRealm
.
setAuthorizationCacheName
(
"authzCache"
);
//注入缓存实现
myShiroRealm
.
setCacheManager
(
redisCacheManager
());
//
//开启全局缓存配置
//
myShiroRealm.setCachingEnabled(true);
//
//启用身份验证缓存,即缓存AuthenticationInfo信息,默认false
//
myShiroRealm.setAuthenticationCachingEnabled(true);
//
//启用授权缓存,即缓存AuthorizationInfo信息,默认false
//
myShiroRealm.setAuthorizationCachingEnabled(true);
//
//
//为了方便操作,我们给缓存起个名字
//
myShiroRealm.setAuthenticationCacheName("authcCache");
//
myShiroRealm.setAuthorizationCacheName("authzCache");
//
//
//注入缓存实现
//
myShiroRealm.setCacheManager(redisCacheManager());
return
new
MyShiroRealm
();
}
...
...
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