alexxiyang / shiro-redis

shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!
MIT License
1.17k stars 446 forks source link

springboot readMe shiro-redis.redis-anager.host写错了 #77

Closed zhouyufan0568 closed 5 years ago

zhouyufan0568 commented 5 years ago

我给shiro-redis.redis-anager.host设置一个错的值,还是能正确访问本地的127.0.0.1:6379 在服务器上设置一个正确的值,反而不能访问到 redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool at redis.clients.util.Pool.getResource(Pool.java:53) at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226) at org.crazycake.shiro.RedisManager.getJedis(RedisManager.java:35) at org.crazycake.shiro.WorkAloneRedisManager.set(WorkAloneRedisManager.java:71) at org.crazycake.shiro.RedisSessionDAO.saveSession(RedisSessionDAO.java:73) at org.crazycake.shiro.RedisSessionDAO.doCreate(RedisSessionDAO.java:124) at org.apache.shiro.session.mgt.eis.AbstractSessionDAO.create(AbstractSessionDAO.java:116) at org.apache.shiro.session.mgt.DefaultSessionManager.create(DefaultSessionManager.java:177) at org.apache.shiro.session.mgt.DefaultSessionManager.doCreateSession(DefaultSessionManager.java:158) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.createSession(AbstractValidatingSessionManager.java:136) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.start(AbstractNativeSessionManager.java:99) at org.apache.shiro.mgt.SessionsSecurityManager.start(SessionsSecurityManager.java:152) at org.apache.shiro.subject.support.DelegatingSubject.getSession(DelegatingSubject.java:340) at org.apache.shiro.subject.support.DelegatingSubject.getSession(DelegatingSubject.java:316)

zhouyufan0568 commented 5 years ago
    <dependency>
        <groupId>org.apache.shiro</groupId>
        <artifactId>shiro-spring-boot-web-starter</artifactId>
        <version>1.4.0-RC2</version>
    </dependency>

    <!-- 集成shiro-redis -->
    <dependency>
        <groupId>org.crazycake</groupId>
        <artifactId>shiro-redis-spring-boot-starter</artifactId>
        <version>3.2.1</version>
    </dependency>
zhouyufan0568 commented 5 years ago

你的readMe写错了,shiro-redis.redis-manager.host写成了shiro-redis.redis-anager.host,所有的都是

alexxiyang commented 5 years ago

非常感谢,已经修正