package com.usky.config.shiro; import org.apache.shiro.cache.Cache; import org.apache.shiro.cache.CacheException; import org.apache.shiro.cache.CacheManager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; /** * * @author laowo */ public class MyRedisCacheManager implements CacheManager { @Autowired private RedisTemplate redisTemplate; @Override public Cache getCache(String name) throws CacheException { return new ShiroRedisCache(name,redisTemplate); } }