报如下错误:
java.lang.IllegalAccessError: tried to access method redis.clients.jedis.JedisPool.returnResource(Lredis/clients/jedis/Jedis;)V from class org.crazycake.shiro.RedisManager
原因:
自Jedis3.0版本后jedisPool.returnResource() 方法是用protected修饰符所修饰
释:protected:成员是包内可见的,并且对子类可见
所以:调用redis.clients.jedis.JedisPool.returnResource方法出现权限问题
解决方法:
<dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency>