Commit c33e4d1b authored by liqin's avatar liqin 💬

bug fixed

parent 389a09fb
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment