rename cacheManager to shiroCacheManager

This commit is contained in:
JerryMa1024 2020-07-25 09:49:44 +08:00
parent fdb2496f10
commit 4af05dc763
1 changed files with 4 additions and 4 deletions

View File

@ -71,9 +71,9 @@ public class IamBaseAutoConfig {
* *
* @return * @return
*/ */
@Bean @Bean(name = "shiroCacheManager")
@ConditionalOnMissingBean(CacheManager.class) @ConditionalOnMissingBean(CacheManager.class)
public CacheManager cacheManager() { public CacheManager shiroCacheManager() {
String className = iamBaseProperties.getCacheManagerClass(); String className = iamBaseProperties.getCacheManagerClass();
if (V.isEmpty(className)) { if (V.isEmpty(className)) {
return null; return null;
@ -87,10 +87,10 @@ public class IamBaseAutoConfig {
} }
@Bean @Bean
@DependsOn({"cacheManager"}) @DependsOn({"shiroCacheManager"})
public Realm realm() { public Realm realm() {
BaseJwtRealm realm = new BaseJwtRealm(); BaseJwtRealm realm = new BaseJwtRealm();
CacheManager cacheManager = cacheManager(); CacheManager cacheManager = shiroCacheManager();
if (cacheManager != null) { if (cacheManager != null) {
realm.setCachingEnabled(true); realm.setCachingEnabled(true);
realm.setCacheManager(cacheManager); realm.setCacheManager(cacheManager);